Merge pull request #37 from ente-io/pubspec_update

Persist album sort preference
This commit is contained in:
Vishnu Mohandas 2021-09-11 13:51:07 +05:30 committed by GitHub
commit 842bdec750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 9 deletions

View file

@ -228,10 +228,10 @@ class _CollectionsGalleryWidgetState extends State<CollectionsGalleryWidget>
],
),
),
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) {

View file

@ -22,7 +22,7 @@ class LocalSettings {
AlbumSortKey.lastUpdated;
}
void setAlbumSortKey(AlbumSortKey key) {
_prefs.setInt(kCollectionSortPref, key.index);
Future<bool> setAlbumSortKey(AlbumSortKey key) {
return _prefs.setInt(kCollectionSortPref, key.index);
}
}

View file

@ -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:

View file

@ -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"