Merge pull request #37 from ente-io/pubspec_update
Persist album sort preference
This commit is contained in:
commit
842bdec750
4 changed files with 23 additions and 9 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
18
pubspec.lock
18
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:
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue