π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Fix state issue with video loop toggle button
ashilknc6ec5cf64546
diff --git a/mobile/lib/ui/viewer/file/file_app_bar.dart b/mobile/lib/ui/viewer/file/file_app_bar.dartindex 92d6d54239..b65a9d9c1e 100644--- a/mobile/lib/ui/viewer/file/file_app_bar.dart+++ b/mobile/lib/ui/viewer/file/file_app_bar.dart@@ -57,6 +57,7 @@ class FileAppBarState extends State<FileAppBar> {late final StreamSubscription<GuestViewEvent> _guestViewEventSubscription;bool isGuestView = false;bool shouldLoopVideo = Configuration.instance.shouldLoopVideo();+ bool _reloadActions = false;@overridevoid didUpdateWidget(FileAppBar oldWidget) {@@ -89,8 +90,9 @@ class FileAppBarState extends State<FileAppBar> {//When the widget is initialized, the actions are not available.//Cannot call _getActions() in initState.- if (_actions.isEmpty) {+ if (_actions.isEmpty || _reloadActions) {_getActions();+ _reloadActions = false;}final isTrashedFile = widget.file is TrashFile;@@ -372,6 +374,7 @@ class FileAppBarState extends State<FileAppBar> {_onToggleVideoLoop() {Configuration.instance.setShouldLoopVideo(!shouldLoopVideo);setState(() {+ _reloadActions = true;shouldLoopVideo = !shouldLoopVideo;});}