π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Use leading debouncer where ever necessary for better UX
ashilkne07a24a19273
diff --git a/mobile/lib/ui/collections/device/device_folders_grid_view.dart b/mobile/lib/ui/collections/device/device_folders_grid_view.dartindex b9c2588613..6f4ac30f0f 100644--- a/mobile/lib/ui/collections/device/device_folders_grid_view.dart+++ b/mobile/lib/ui/collections/device/device_folders_grid_view.dart@@ -16,8 +16,8 @@ import "package:photos/utils/debouncer.dart";class DeviceFoldersGridView extends StatefulWidget {const DeviceFoldersGridView({- Key? key,- }) : super(key: key);+ super.key,+ });@overrideState<DeviceFoldersGridView> createState() => _DeviceFoldersGridViewState();@@ -31,10 +31,12 @@ class _DeviceFoldersGridViewState extends State<DeviceFoldersGridView> {final _debouncer = Debouncer(const Duration(seconds: 2),executionInterval: const Duration(seconds: 5),+ leading: true,);@overridevoid initState() {+ super.initState();_backupFoldersUpdatedEvent =Bus.instance.on<BackupFoldersUpdatedEvent>().listen((event) {_loadReason = event.reason;@@ -51,8 +53,6 @@ class _DeviceFoldersGridViewState extends State<DeviceFoldersGridView> {}});});-- super.initState();}@overridediff --git a/mobile/lib/ui/collections/device/device_folders_vertical_grid_view.dart b/mobile/lib/ui/collections/device/device_folders_vertical_grid_view.dartindex f465878ff5..d5ac85e0ea 100644--- a/mobile/lib/ui/collections/device/device_folders_vertical_grid_view.dart+++ b/mobile/lib/ui/collections/device/device_folders_vertical_grid_view.dart@@ -74,6 +74,7 @@ class _DeviceFolderVerticalGridViewBodyState@overridevoid initState() {+ super.initState();_backupFoldersUpdatedEvent =Bus.instance.on<BackupFoldersUpdatedEvent>().listen((event) {_loadReason = event.reason;@@ -90,7 +91,6 @@ class _DeviceFolderVerticalGridViewBodyState}});});- super.initState();}@overridediff --git a/mobile/lib/ui/map/map_view.dart b/mobile/lib/ui/map/map_view.dartindex 8804774223..3629da7e96 100644--- a/mobile/lib/ui/map/map_view.dart+++ b/mobile/lib/ui/map/map_view.dart@@ -28,7 +28,7 @@ class MapView extends StatefulWidget {static const defaultMarkerSize = Size(75, 75);const MapView({- Key? key,+ super.key,required this.updateVisibleImages,required this.imageMarkers,required this.controller,@@ -42,7 +42,7 @@ class MapView extends StatefulWidget {this.onTap,this.interactiveFlags = InteractiveFlag.all,this.showControls = true,- }) : super(key: key);+ });@overrideState<StatefulWidget> createState() => _MapViewState();diff --git a/mobile/lib/ui/sharing/user_avator_widget.dart b/mobile/lib/ui/sharing/user_avator_widget.dartindex 8b06f09ede..a69430a953 100644--- a/mobile/lib/ui/sharing/user_avator_widget.dart+++ b/mobile/lib/ui/sharing/user_avator_widget.dart@@ -45,6 +45,7 @@ class _UserAvatarWidgetState extends State<UserAvatarWidget> {final _debouncer = Debouncer(const Duration(milliseconds: 250),executionInterval: const Duration(seconds: 20),+ leading: true,);@overridediff --git a/mobile/lib/ui/tabs/shared_collections_tab.dart b/mobile/lib/ui/tabs/shared_collections_tab.dartindex 7e93abca39..a6e7f3c679 100644--- a/mobile/lib/ui/tabs/shared_collections_tab.dart+++ b/mobile/lib/ui/tabs/shared_collections_tab.dart@@ -40,6 +40,7 @@ class _SharedCollectionsTabState extends State<SharedCollectionsTab>final _debouncer = Debouncer(const Duration(seconds: 2),executionInterval: const Duration(seconds: 5),+ leading: true,);static const heroTagPrefix = "outgoing_collection";diff --git a/mobile/lib/ui/tabs/user_collections_tab.dart b/mobile/lib/ui/tabs/user_collections_tab.dartindex b7b1b74829..5e8431a5a9 100644--- a/mobile/lib/ui/tabs/user_collections_tab.dart+++ b/mobile/lib/ui/tabs/user_collections_tab.dart@@ -54,6 +54,7 @@ class _UserCollectionsTabState extends State<UserCollectionsTab>final _debouncer = Debouncer(const Duration(seconds: 2),executionInterval: const Duration(seconds: 5),+ leading: true,);static const int _kOnEnteItemLimitCount = 10;diff --git a/mobile/lib/ui/viewer/gallery/gallery.dart b/mobile/lib/ui/viewer/gallery/gallery.dartindex 1788866697..8eea50057c 100644--- a/mobile/lib/ui/viewer/gallery/gallery.dart+++ b/mobile/lib/ui/viewer/gallery/gallery.dart@@ -125,6 +125,7 @@ class GalleryState extends State<Gallery> {_debouncer = Debouncer(widget.reloadDebounceTime,executionInterval: widget.reloadDebounceExecutionInterval,+ leading: true,);_sortOrderAsc = widget.sortAsyncFn != null ? widget.sortAsyncFn!() : false;_itemScroller = ItemScrollController();