fix: Import sticker packs

pull/2349/head
Christian Kußowski 2 months ago
parent 31b3758622
commit 1a38777cea
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -276,26 +276,16 @@ class EmotesSettingsController extends State<EmotesSettings> {
}
Future<void> importEmojiZip() async {
final result = await showFutureLoadingDialog<Archive?>(
context: context,
future: () async {
final result = await selectFiles(
context,
type: FileSelectorType.zip,
);
if (result.isEmpty) return null;
final buffer = InputMemoryStream(await result.first.readAsBytes());
final result = await selectFiles(
context,
type: FileSelectorType.zip,
);
final archive = ZipDecoder().decodeStream(buffer);
if (result.isEmpty) return;
return archive;
},
);
final buffer = InputMemoryStream(await result.single.readAsBytes());
final archive = result.result;
if (archive == null) return;
final archive = ZipDecoder().decodeStream(buffer);
await showDialog(
context: context,

Loading…
Cancel
Save