diff --git a/lib/ui/collections_gallery_widget.dart b/lib/ui/collections_gallery_widget.dart index 113f903f3a581ececfb6736b46362d9249b372e1..11e3e4e531d05dfa9d6169696ac7b20535f75851 100644 --- a/lib/ui/collections_gallery_widget.dart +++ b/lib/ui/collections_gallery_widget.dart @@ -228,10 +228,10 @@ class _CollectionsGalleryWidgetState extends State ], ), ), - onSelected: (int index) { - setState(() { - sortKey = AlbumSortKey.values[index]; - }); + onSelected: (int index) async { + sortKey = AlbumSortKey.values[index]; + await LocalSettings.instance.setAlbumSortKey(sortKey); + setState(() {}); }, itemBuilder: (context) { return List.generate(AlbumSortKey.values.length, (index) { diff --git a/lib/utils/local_settings.dart b/lib/utils/local_settings.dart index db5a19ab4179c371b23780a093443bf8e9a924de..d1d6f8e2f8fd76f2cb0ac47711ddad0f68a76a6d 100644 --- a/lib/utils/local_settings.dart +++ b/lib/utils/local_settings.dart @@ -22,7 +22,7 @@ class LocalSettings { AlbumSortKey.lastUpdated; } - void setAlbumSortKey(AlbumSortKey key) { - _prefs.setInt(kCollectionSortPref, key.index); + Future setAlbumSortKey(AlbumSortKey key) { + return _prefs.setInt(kCollectionSortPref, key.index); } } diff --git a/pubspec.lock b/pubspec.lock index c4e5f8cfb30dad15f2feca004690ea2239634e6f..29061eae67c7003aac4057fbe18e5f81d9c22418 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -315,7 +315,21 @@ packages: name: flutter_keyboard_visibility url: "https://pub.dartlang.org" source: hosted - version: "3.3.0" + version: "5.0.3" + flutter_keyboard_visibility_platform_interface: + dependency: transitive + description: + name: flutter_keyboard_visibility_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + flutter_keyboard_visibility_web: + dependency: transitive + description: + name: flutter_keyboard_visibility_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" flutter_launcher_icons: dependency: "direct dev" description: @@ -395,7 +409,7 @@ packages: name: flutter_typeahead url: "https://pub.dartlang.org" source: hosted - version: "1.8.8" + version: "3.2.1" flutter_user_agent: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 7f6c97e92282ff949ac75e068d6b4855f6d753d1..0e7d40c16657d4e5e64c739066af1dee3921e6bc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: ente photos application # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.3.24+234 +version: 0.3.26+236 environment: sdk: ">=2.10.0 <3.0.0"