diff --git a/lib/ui/collections_gallery_widget.dart b/lib/ui/collections_gallery_widget.dart index 113f903f3..11e3e4e53 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 db5a19ab4..d1d6f8e2f 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 c4e5f8cfb..29061eae6 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 7f6c97e92..0e7d40c16 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"