diff --git a/lib/pages/settings_emotes/settings_emotes.dart b/lib/pages/settings_emotes/settings_emotes.dart index 40730d8e4..98e06e96c 100644 --- a/lib/pages/settings_emotes/settings_emotes.dart +++ b/lib/pages/settings_emotes/settings_emotes.dart @@ -286,9 +286,9 @@ class EmotesSettingsController extends State { if (result.isEmpty) return null; - final buffer = InputStream(await result.first.readAsBytes()); + final buffer = InputMemoryStream(await result.first.readAsBytes()); - final archive = ZipDecoder().decodeBuffer(buffer); + final archive = ZipDecoder().decodeStream(buffer); return archive; }, @@ -338,8 +338,6 @@ class EmotesSettingsController extends State { '${pack.pack.displayName ?? client.userID?.localpart ?? 'emotes'}.zip'; final output = ZipEncoder().encode(archive); - if (output == null) return; - MatrixFile( name: fileName, bytes: Uint8List.fromList(output), diff --git a/pubspec.lock b/pubspec.lock index b2c442328..161ae9c88 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -74,10 +74,10 @@ packages: dependency: "direct main" description: name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "4.0.7" args: dependency: transitive description: @@ -947,10 +947,10 @@ packages: dependency: "direct main" description: name: image - sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d + sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928" url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.5.4" image_picker: dependency: "direct main" description: @@ -1468,6 +1468,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + posix: + dependency: transitive + description: + name: posix + sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" + url: "https://pub.dev" + source: hosted + version: "6.0.3" pretty_qr_code: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index b7b50f89f..25dc46a5f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: animations: ^2.0.11 app_links: ^6.3.3 - archive: ^3.4.10 + archive: ^4.0.7 async: ^2.11.0 badges: ^3.1.2 blurhash_dart: ^1.2.1