From 29b016661a0d20aba14aaf3725566287f8d24ee4 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Sat, 11 Sep 2021 12:23:15 +0530 Subject: [PATCH 1/5] Update pubspec.lock --- pubspec.lock | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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: From 1578bf2529917ae3310a1c647f51e4296c3d1b35 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Sat, 11 Sep 2021 12:31:47 +0530 Subject: [PATCH 2/5] Persist updated sort key to disk --- lib/ui/collections_gallery_widget.dart | 3 ++- lib/utils/local_settings.dart | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ui/collections_gallery_widget.dart b/lib/ui/collections_gallery_widget.dart index 113f903f3..16f3c739b 100644 --- a/lib/ui/collections_gallery_widget.dart +++ b/lib/ui/collections_gallery_widget.dart @@ -228,7 +228,8 @@ class _CollectionsGalleryWidgetState extends State ], ), ), - onSelected: (int index) { + onSelected: (int index) async { + await LocalSettings.instance.setAlbumSortKey(sortKey); setState(() { sortKey = AlbumSortKey.values[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); } } From 89662c573d5d84102af1afebb9eac95dc88b23bb Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Sat, 11 Sep 2021 12:31:59 +0530 Subject: [PATCH 3/5] v0.3.25 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7f6c97e92..0f18173fb 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.25+235 environment: sdk: ">=2.10.0 <3.0.0" From 38388ad58445862413d210c703b3ca6f3502d84f Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Sat, 11 Sep 2021 12:42:53 +0530 Subject: [PATCH 4/5] Persist the correct sortKey --- lib/ui/collections_gallery_widget.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ui/collections_gallery_widget.dart b/lib/ui/collections_gallery_widget.dart index 16f3c739b..11e3e4e53 100644 --- a/lib/ui/collections_gallery_widget.dart +++ b/lib/ui/collections_gallery_widget.dart @@ -229,10 +229,9 @@ class _CollectionsGalleryWidgetState extends State ), ), onSelected: (int index) async { + sortKey = AlbumSortKey.values[index]; await LocalSettings.instance.setAlbumSortKey(sortKey); - setState(() { - sortKey = AlbumSortKey.values[index]; - }); + setState(() {}); }, itemBuilder: (context) { return List.generate(AlbumSortKey.values.length, (index) { From 7f035deb8eaedfe1f7c05ce04c7bb1827283f079 Mon Sep 17 00:00:00 2001 From: vishnukvmd Date: Sat, 11 Sep 2021 12:43:17 +0530 Subject: [PATCH 5/5] Up version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 0f18173fb..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.25+235 +version: 0.3.26+236 environment: sdk: ">=2.10.0 <3.0.0"