chore: Follow up pick files with file selector
This commit is contained in:
parent
44bd4db774
commit
fe06f2efb3
8 changed files with 36 additions and 25 deletions
|
|
@ -221,7 +221,10 @@ class EmotesSettingsController extends State<EmotesSettings> {
|
|||
void imagePickerAction(
|
||||
ValueNotifier<ImagePackImageContent?> controller,
|
||||
) async {
|
||||
final result = await selectFiles(context, extensions: imageExtensions);
|
||||
final result = await selectFiles(
|
||||
context,
|
||||
type: FileSelectorType.images,
|
||||
);
|
||||
final pickedFile = result.firstOrNull;
|
||||
if (pickedFile == null) return;
|
||||
var file = MatrixImageFile(
|
||||
|
|
@ -278,10 +281,7 @@ class EmotesSettingsController extends State<EmotesSettings> {
|
|||
future: () async {
|
||||
final result = await selectFiles(
|
||||
context,
|
||||
extensions: [
|
||||
'zip',
|
||||
// TODO: add further encoders
|
||||
],
|
||||
type: FileSelectorType.zip,
|
||||
);
|
||||
|
||||
if (result.isEmpty) return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue