π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Minor refractor
AmanRajSinghMourya610bfbeea3c1
diff --git a/mobile/apps/locker/ios/Podfile.lock b/mobile/apps/locker/ios/Podfile.lockindex 174a4f586e..a7bd9ec10f 100644--- a/mobile/apps/locker/ios/Podfile.lock+++ b/mobile/apps/locker/ios/Podfile.lock@@ -75,9 +75,9 @@ PODS:- FlutterMacOS- privacy_screen (0.0.1):- Flutter- - SDWebImage (5.21.1):- - SDWebImage/Core (= 5.21.1)- - SDWebImage/Core (5.21.1)+ - SDWebImage (5.21.3):+ - SDWebImage/Core (= 5.21.3)+ - SDWebImage/Core (5.21.3)- Sentry/HybridSDK (8.46.0)- sentry_flutter (8.14.2):- Flutter@@ -209,7 +209,7 @@ SPEC CHECKSUMS:package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564privacy_screen: 3159a541f5d3a31bea916cfd4e58f9dc722b3fd4- SDWebImage: f29024626962457f3470184232766516dee8dfea+ SDWebImage: 16309af6d214ba3f77a7c6f6fdda888cb313a50aSentry: da60d980b197a46db0b35ea12cb8f39af48d8854sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58adiff --git a/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxproj b/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxprojindex 683226caa0..eca249462f 100644--- a/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxproj+++ b/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxproj@@ -11,13 +11,13 @@27AD87F62E16554700B24C05 /* Share Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 27AD87EC2E16554700B24C05 /* Share Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };- 4CDDC127876941DC8FF88929 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81319B7747381DEFA0F961F7 /* Pods_Runner.framework */; };+ 3C6BFE5658BB00D6CD0817C3 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CC4898C26789798E1BB0B30 /* Pods_RunnerTests.framework */; };74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };- 92402655AF53FB304C48E4BC /* Pods_Share_Extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B8B5400AA6FED21CC714A5A0 /* Pods_Share_Extension.framework */; };- 9373AE318AB19621F0BB5602 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 871674596693C14F59CB67C9 /* Pods_RunnerTests.framework */; };97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };+ AA20460AF9EE40835E2EE7CA /* Pods_Share_Extension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58DF8119C230E689A5426569 /* Pods_Share_Extension.framework */; };+ E2A88032BDAB3C09C4A0935B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7206BB765BC4F72B7383E6D0 /* Pods_Runner.framework */; };/* End PBXBuildFile section *//* Begin PBXContainerItemProxy section */@@ -62,24 +62,25 @@/* End PBXCopyFilesBuildPhase section *//* Begin PBXFileReference section */- 041816B42CE5846482BE66D6 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };+ 0816F12D78EF79D15CE46612 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };+ 0B822580A3786274B33019AD /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };+ 15291FA388218CDA71938F7F /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };+ 1A4E697D44F56476A109729B /* Pods-Share Extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Share Extension.debug.xcconfig"; path = "Target Support Files/Pods-Share Extension/Pods-Share Extension.debug.xcconfig"; sourceTree = "<group>"; };27AD87D62E16497400B24C05 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };27AD87EC2E16554700B24C05 /* Share Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Share Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };+ 30747C61C19C63BFA7D7EB9C /* Pods-Share Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Share Extension.release.xcconfig"; path = "Target Support Files/Pods-Share Extension/Pods-Share Extension.release.xcconfig"; sourceTree = "<group>"; };331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };- 3AEDBF29614F8677DCE69E7E /* Pods-Ente Locker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Ente Locker.release.xcconfig"; path = "Target Support Files/Pods-Ente Locker/Pods-Ente Locker.release.xcconfig"; sourceTree = "<group>"; };3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };- 405BE3630B56B70E48B35F05 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };- 43F401025D1F7ED737A76C71 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };- 611BD59A807D8565F74139DC /* Pods_Ente_Locker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Ente_Locker.framework; sourceTree = BUILT_PRODUCTS_DIR; };+ 58DF8119C230E689A5426569 /* Pods_Share_Extension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Share_Extension.framework; sourceTree = BUILT_PRODUCTS_DIR; };+ 5CC4898C26789798E1BB0B30 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };+ 7206BB765BC4F72B7383E6D0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };- 81319B7747381DEFA0F961F7 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };- 871674596693C14F59CB67C9 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };- 89AC4F9CF1F94E149746EB60 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };+ 8663DBD7771DBF3591ACC89A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };@@ -87,14 +88,9 @@97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };- A1080DB69690A2BD27969FC2 /* Pods-Share Extension.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Share Extension.profile.xcconfig"; path = "Target Support Files/Pods-Share Extension/Pods-Share Extension.profile.xcconfig"; sourceTree = "<group>"; };- A68B5D5A3F2AA255856692FC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };- B8B5400AA6FED21CC714A5A0 /* Pods_Share_Extension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Share_Extension.framework; sourceTree = BUILT_PRODUCTS_DIR; };- B96B59C79D8F854FB9838CDF /* Pods-Ente Locker.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Ente Locker.profile.xcconfig"; path = "Target Support Files/Pods-Ente Locker/Pods-Ente Locker.profile.xcconfig"; sourceTree = "<group>"; };- C775876A93D19660332985CC /* Pods-Ente Locker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Ente Locker.debug.xcconfig"; path = "Target Support Files/Pods-Ente Locker/Pods-Ente Locker.debug.xcconfig"; sourceTree = "<group>"; };- D09D02A78DCA8C010704EF91 /* Pods-Share Extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Share Extension.debug.xcconfig"; path = "Target Support Files/Pods-Share Extension/Pods-Share Extension.debug.xcconfig"; sourceTree = "<group>"; };- E11D72536D63426171C60203 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };- F4C835C880E118F472E3A8B3 /* Pods-Share Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Share Extension.release.xcconfig"; path = "Target Support Files/Pods-Share Extension/Pods-Share Extension.release.xcconfig"; sourceTree = "<group>"; };+ A36046F95574AD5DD1298B45 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };+ BED88D426B5BB0D15EAB4AE2 /* Pods-Share Extension.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Share Extension.profile.xcconfig"; path = "Target Support Files/Pods-Share Extension/Pods-Share Extension.profile.xcconfig"; sourceTree = "<group>"; };+ C08EC525726B71B32D41BA9F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };/* End PBXFileReference section *//* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */@@ -138,7 +134,7 @@isa = PBXFrameworksBuildPhase;buildActionMask = 2147483647;files = (- 92402655AF53FB304C48E4BC /* Pods_Share_Extension.framework in Frameworks */,+ AA20460AF9EE40835E2EE7CA /* Pods_Share_Extension.framework in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;};@@ -146,7 +142,7 @@isa = PBXFrameworksBuildPhase;buildActionMask = 2147483647;files = (- 4CDDC127876941DC8FF88929 /* Pods_Runner.framework in Frameworks */,+ E2A88032BDAB3C09C4A0935B /* Pods_Runner.framework in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;};@@ -154,7 +150,7 @@isa = PBXFrameworksBuildPhase;buildActionMask = 2147483647;files = (- 9373AE318AB19621F0BB5602 /* Pods_RunnerTests.framework in Frameworks */,+ 3C6BFE5658BB00D6CD0817C3 /* Pods_RunnerTests.framework in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;};@@ -172,18 +168,15 @@35603BA520E189E527465052 /* Pods */ = {isa = PBXGroup;children = (- A68B5D5A3F2AA255856692FC /* Pods-Runner.debug.xcconfig */,- 89AC4F9CF1F94E149746EB60 /* Pods-Runner.release.xcconfig */,- 405BE3630B56B70E48B35F05 /* Pods-Runner.profile.xcconfig */,- E11D72536D63426171C60203 /* Pods-RunnerTests.debug.xcconfig */,- 43F401025D1F7ED737A76C71 /* Pods-RunnerTests.release.xcconfig */,- 041816B42CE5846482BE66D6 /* Pods-RunnerTests.profile.xcconfig */,- C775876A93D19660332985CC /* Pods-Ente Locker.debug.xcconfig */,- 3AEDBF29614F8677DCE69E7E /* Pods-Ente Locker.release.xcconfig */,- B96B59C79D8F854FB9838CDF /* Pods-Ente Locker.profile.xcconfig */,- D09D02A78DCA8C010704EF91 /* Pods-Share Extension.debug.xcconfig */,- F4C835C880E118F472E3A8B3 /* Pods-Share Extension.release.xcconfig */,- A1080DB69690A2BD27969FC2 /* Pods-Share Extension.profile.xcconfig */,+ C08EC525726B71B32D41BA9F /* Pods-Runner.debug.xcconfig */,+ A36046F95574AD5DD1298B45 /* Pods-Runner.release.xcconfig */,+ 8663DBD7771DBF3591ACC89A /* Pods-Runner.profile.xcconfig */,+ 0B822580A3786274B33019AD /* Pods-RunnerTests.debug.xcconfig */,+ 0816F12D78EF79D15CE46612 /* Pods-RunnerTests.release.xcconfig */,+ 15291FA388218CDA71938F7F /* Pods-RunnerTests.profile.xcconfig */,+ 1A4E697D44F56476A109729B /* Pods-Share Extension.debug.xcconfig */,+ 30747C61C19C63BFA7D7EB9C /* Pods-Share Extension.release.xcconfig */,+ BED88D426B5BB0D15EAB4AE2 /* Pods-Share Extension.profile.xcconfig */,);path = Pods;sourceTree = "<group>";@@ -209,7 +202,7 @@97C146EF1CF9000F007C117D /* Products */,331C8082294A63A400263BE5 /* RunnerTests */,35603BA520E189E527465052 /* Pods */,- DE91D11FDE3D2B3ABE02BCCD /* Frameworks */,+ E0111B9CF16DF4A0033AAA84 /* Frameworks */,);sourceTree = "<group>";};@@ -239,13 +232,12 @@path = Runner;sourceTree = "<group>";};- DE91D11FDE3D2B3ABE02BCCD /* Frameworks */ = {+ E0111B9CF16DF4A0033AAA84 /* Frameworks */ = {isa = PBXGroup;children = (- 81319B7747381DEFA0F961F7 /* Pods_Runner.framework */,- 871674596693C14F59CB67C9 /* Pods_RunnerTests.framework */,- 611BD59A807D8565F74139DC /* Pods_Ente_Locker.framework */,- B8B5400AA6FED21CC714A5A0 /* Pods_Share_Extension.framework */,+ 7206BB765BC4F72B7383E6D0 /* Pods_Runner.framework */,+ 5CC4898C26789798E1BB0B30 /* Pods_RunnerTests.framework */,+ 58DF8119C230E689A5426569 /* Pods_Share_Extension.framework */,);name = Frameworks;sourceTree = "<group>";@@ -257,7 +249,7 @@isa = PBXNativeTarget;buildConfigurationList = 27AD87F82E16554700B24C05 /* Build configuration list for PBXNativeTarget "Share Extension" */;buildPhases = (- 1304177914FB1E5B189BACD6 /* [CP] Check Pods Manifest.lock */,+ 2269C3AD65D071734AF13B20 /* [CP] Check Pods Manifest.lock */,27AD87E82E16554700B24C05 /* Sources */,27AD87E92E16554700B24C05 /* Frameworks */,27AD87EA2E16554700B24C05 /* Resources */,@@ -278,7 +270,7 @@isa = PBXNativeTarget;buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;buildPhases = (- AF55335C8D25422D2D282490 /* [CP] Check Pods Manifest.lock */,+ A6CD94B844BC5EACB7A8F101 /* [CP] Check Pods Manifest.lock */,331C807D294A63A400263BE5 /* Sources */,331C807F294A63A400263BE5 /* Resources */,CF47A9397DB3A7B2B1C598E3 /* Frameworks */,@@ -297,7 +289,7 @@isa = PBXNativeTarget;buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;buildPhases = (- DA099182B8E4842D754F598F /* [CP] Check Pods Manifest.lock */,+ 95EA1C55C1859216DB1FDA66 /* [CP] Check Pods Manifest.lock */,9740EEB61CF901F6004384FC /* Run Script */,97C146EA1CF9000F007C117D /* Sources */,97C146EB1CF9000F007C117D /* Frameworks */,@@ -305,7 +297,7 @@9705A1C41CF9048500538489 /* Embed Frameworks */,27AD87D02E1647E900B24C05 /* Embed Foundation Extensions */,3B06AD1E1E4923F5004D2608 /* Thin Binary */,- 82B64A7C257381AA0C0D6B15 /* [CP] Embed Pods Frameworks */,+ 7763A38CDA81BAAA32663744 /* [CP] Embed Pods Frameworks */,);buildRules = ();@@ -390,7 +382,7 @@/* End PBXResourcesBuildPhase section *//* Begin PBXShellScriptBuildPhase section */- 1304177914FB1E5B189BACD6 /* [CP] Check Pods Manifest.lock */ = {+ 2269C3AD65D071734AF13B20 /* [CP] Check Pods Manifest.lock */ = {isa = PBXShellScriptBuildPhase;buildActionMask = 2147483647;files = (@@ -428,7 +420,7 @@shellPath = /bin/sh;shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";};- 82B64A7C257381AA0C0D6B15 /* [CP] Embed Pods Frameworks */ = {+ 7763A38CDA81BAAA32663744 /* [CP] Embed Pods Frameworks */ = {isa = PBXShellScriptBuildPhase;buildActionMask = 2147483647;files = (@@ -445,44 +437,44 @@shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";showEnvVarsInLog = 0;};- 9740EEB61CF901F6004384FC /* Run Script */ = {+ 95EA1C55C1859216DB1FDA66 /* [CP] Check Pods Manifest.lock */ = {isa = PBXShellScriptBuildPhase;- alwaysOutOfDate = 1;buildActionMask = 2147483647;files = ();+ inputFileListPaths = (+ );inputPaths = (+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",+ "${PODS_ROOT}/Manifest.lock",+ );+ name = "[CP] Check Pods Manifest.lock";+ outputFileListPaths = ();- name = "Run Script";outputPaths = (+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",);runOnlyForDeploymentPostprocessing = 0;shellPath = /bin/sh;- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";+ showEnvVarsInLog = 0;};- AF55335C8D25422D2D282490 /* [CP] Check Pods Manifest.lock */ = {+ 9740EEB61CF901F6004384FC /* Run Script */ = {isa = PBXShellScriptBuildPhase;+ alwaysOutOfDate = 1;buildActionMask = 2147483647;files = ();- inputFileListPaths = (- );inputPaths = (- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",- "${PODS_ROOT}/Manifest.lock",- );- name = "[CP] Check Pods Manifest.lock";- outputFileListPaths = ();+ name = "Run Script";outputPaths = (- "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",);runOnlyForDeploymentPostprocessing = 0;shellPath = /bin/sh;- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";- showEnvVarsInLog = 0;+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";};- DA099182B8E4842D754F598F /* [CP] Check Pods Manifest.lock */ = {+ A6CD94B844BC5EACB7A8F101 /* [CP] Check Pods Manifest.lock */ = {isa = PBXShellScriptBuildPhase;buildActionMask = 2147483647;files = (@@ -497,7 +489,7 @@outputFileListPaths = ();outputPaths = (- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",+ "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",);runOnlyForDeploymentPostprocessing = 0;shellPath = /bin/sh;@@ -646,7 +638,7 @@};27AD87F92E16554700B24C05 /* Debug */ = {isa = XCBuildConfiguration;- baseConfigurationReference = D09D02A78DCA8C010704EF91 /* Pods-Share Extension.debug.xcconfig */;+ baseConfigurationReference = 1A4E697D44F56476A109729B /* Pods-Share Extension.debug.xcconfig */;buildSettings = {CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";@@ -688,7 +680,7 @@};27AD87FA2E16554700B24C05 /* Release */ = {isa = XCBuildConfiguration;- baseConfigurationReference = F4C835C880E118F472E3A8B3 /* Pods-Share Extension.release.xcconfig */;+ baseConfigurationReference = 30747C61C19C63BFA7D7EB9C /* Pods-Share Extension.release.xcconfig */;buildSettings = {CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";@@ -727,7 +719,7 @@};27AD87FB2E16554700B24C05 /* Profile */ = {isa = XCBuildConfiguration;- baseConfigurationReference = A1080DB69690A2BD27969FC2 /* Pods-Share Extension.profile.xcconfig */;+ baseConfigurationReference = BED88D426B5BB0D15EAB4AE2 /* Pods-Share Extension.profile.xcconfig */;buildSettings = {CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";@@ -766,7 +758,7 @@};331C8088294A63A400263BE5 /* Debug */ = {isa = XCBuildConfiguration;- baseConfigurationReference = E11D72536D63426171C60203 /* Pods-RunnerTests.debug.xcconfig */;+ baseConfigurationReference = 0B822580A3786274B33019AD /* Pods-RunnerTests.debug.xcconfig */;buildSettings = {BUNDLE_LOADER = "$(TEST_HOST)";CODE_SIGN_STYLE = Automatic;@@ -784,7 +776,7 @@};331C8089294A63A400263BE5 /* Release */ = {isa = XCBuildConfiguration;- baseConfigurationReference = 43F401025D1F7ED737A76C71 /* Pods-RunnerTests.release.xcconfig */;+ baseConfigurationReference = 0816F12D78EF79D15CE46612 /* Pods-RunnerTests.release.xcconfig */;buildSettings = {BUNDLE_LOADER = "$(TEST_HOST)";CODE_SIGN_STYLE = Automatic;@@ -800,7 +792,7 @@};331C808A294A63A400263BE5 /* Profile */ = {isa = XCBuildConfiguration;- baseConfigurationReference = 041816B42CE5846482BE66D6 /* Pods-RunnerTests.profile.xcconfig */;+ baseConfigurationReference = 15291FA388218CDA71938F7F /* Pods-RunnerTests.profile.xcconfig */;buildSettings = {BUNDLE_LOADER = "$(TEST_HOST)";CODE_SIGN_STYLE = Automatic;diff --git a/mobile/apps/locker/lib/ui/components/collection_list_widget.dart b/mobile/apps/locker/lib/ui/components/collection_list_widget.dartindex ab59eb27c4..570b6893cb 100644--- a/mobile/apps/locker/lib/ui/components/collection_list_widget.dart+++ b/mobile/apps/locker/lib/ui/components/collection_list_widget.dart@@ -1,18 +1,13 @@-import "package:ente_events/event_bus.dart";import "package:ente_ui/components/buttons/icon_button_widget.dart";import "package:ente_ui/theme/ente_theme.dart";import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";-import "package:locker/events/collections_updated_event.dart";import "package:locker/l10n/l10n.dart";import "package:locker/models/selected_collections.dart";import "package:locker/services/collections/collections_service.dart";import "package:locker/services/collections/models/collection.dart";-import "package:locker/services/collections/models/collection_view_type.dart";-import "package:locker/services/configuration.dart";+import "package:locker/ui/components/collection_popup_menu_builder.dart";import "package:locker/ui/components/item_list_view.dart";-import "package:locker/ui/pages/collection_page.dart";-import "package:locker/utils/collection_actions.dart";class CollectionListWidget extends StatelessWidget {final Collection collection;@@ -101,7 +96,7 @@ class CollectionListWidget extends StatelessWidget {if (onTapCallback != null) {onTapCallback!(collection);} else {- _openCollection(context);+ CollectionPopupMenuBuilder.openCollection(context, collection);}},onLongPress: () {@@ -147,7 +142,12 @@ class CollectionListWidget extends StatelessWidget {): PopupMenuButton<String>(onSelected: (value) =>- _handleMenuAction(context, value),+ CollectionPopupMenuBuilder.handleMenuAction(+ context,+ value,+ collection,+ overflowActions,+ ),child: Padding(padding: const EdgeInsets.all(12.0),child: HugeIcon(@@ -156,7 +156,12 @@ class CollectionListWidget extends StatelessWidget {),),itemBuilder: (BuildContext context) {- return _buildPopupMenuItems(context);+ return CollectionPopupMenuBuilder+ .buildPopupMenuItems(+ context,+ collection,+ overflowActions,+ );},),),@@ -168,113 +173,4 @@ class CollectionListWidget extends StatelessWidget {),);}-- List<PopupMenuItem<String>> _buildPopupMenuItems(BuildContext context) {- final collectionViewType =- getCollectionViewType(collection, Configuration.instance.getUserID()!);- if (overflowActions != null && overflowActions!.isNotEmpty) {- return overflowActions!- .map(- (action) => PopupMenuItem<String>(- value: action.id,- child: Row(- children: [- Icon(action.icon, size: 16),- const SizedBox(width: 8),- Text(action.label),- ],- ),- ),- )- .toList();- } else {- return [- if (collectionViewType == CollectionViewType.ownedCollection ||- collectionViewType == CollectionViewType.hiddenOwnedCollection ||- collectionViewType == CollectionViewType.quickLink)- PopupMenuItem<String>(- value: 'edit',- child: Row(- children: [- const Icon(Icons.edit, size: 16),- const SizedBox(width: 8),- Text(context.l10n.edit),- ],- ),- ),- if (collectionViewType == CollectionViewType.ownedCollection ||- collectionViewType == CollectionViewType.hiddenOwnedCollection ||- collectionViewType == CollectionViewType.quickLink)- PopupMenuItem<String>(- value: 'delete',- child: Row(- children: [- const Icon(Icons.delete, size: 16),- const SizedBox(width: 8),- Text(context.l10n.delete),- ],- ),- ),- if (collectionViewType == CollectionViewType.sharedCollection)- PopupMenuItem<String>(- value: 'leave_collection',- child: Row(- children: [- const Icon(Icons.logout),- const SizedBox(width: 12),- Text(context.l10n.leaveCollection),- ],- ),- ),- ];- }- }-- void _handleMenuAction(BuildContext context, String action) {- if (overflowActions != null && overflowActions!.isNotEmpty) {- final customAction = overflowActions!.firstWhere(- (a) => a.id == action,- orElse: () => throw StateError('Action not found'),- );- customAction.onTap(context, null, collection);- } else {- switch (action) {- case 'edit':- _editCollection(context);- break;- case 'delete':- _deleteCollection(context);- break;- case 'leave_collection':- _leaveCollection(context);- break;- }- }- }-- void _editCollection(BuildContext context) {- CollectionActions.editCollection(context, collection);- }-- void _deleteCollection(BuildContext context) {- CollectionActions.deleteCollection(context, collection);- }-- void _openCollection(BuildContext context) {- Navigator.of(context).push(- MaterialPageRoute(- builder: (context) => CollectionPage(collection: collection),- ),- );- }-- Future<void> _leaveCollection(BuildContext context) async {- await CollectionActions.leaveCollection(- context,- collection,- onSuccess: () {- Bus.instance.fire(CollectionsUpdatedEvent());- },- );- }}diff --git a/mobile/apps/locker/lib/ui/components/collection_popup_menu_builder.dart b/mobile/apps/locker/lib/ui/components/collection_popup_menu_builder.dartnew file mode 100644index 0000000000..0e8cb92638--- /dev/null+++ b/mobile/apps/locker/lib/ui/components/collection_popup_menu_builder.dart@@ -0,0 +1,213 @@+import "package:ente_events/event_bus.dart";+import "package:flutter/material.dart";+import "package:hugeicons/hugeicons.dart";+import "package:locker/events/collections_updated_event.dart";+import "package:locker/l10n/l10n.dart";+import "package:locker/services/collections/models/collection.dart";+import "package:locker/services/collections/models/collection_view_type.dart";+import "package:locker/services/configuration.dart";+import "package:locker/ui/components/item_list_view.dart";+import "package:locker/ui/pages/collection_page.dart";+import "package:locker/utils/collection_actions.dart";++/// Centralized builder for collection popup menus and actions+///+/// This class provides:+/// - Menu item building for collection popup menus+/// - Centralized action handling for edit, delete, and leave collection+/// - Navigation helper for opening collection pages+class CollectionPopupMenuBuilder {+ /// Builds popup menu items based on collection view type and overflow actions+ static List<PopupMenuItem<String>> buildPopupMenuItems(+ BuildContext context,+ Collection collection,+ List<OverflowMenuAction>? overflowActions,+ ) {+ if (overflowActions != null && overflowActions.isNotEmpty) {+ return overflowActions+ .map(+ (action) => PopupMenuItem<String>(+ value: action.id,+ child: Row(+ children: [+ Icon(+ action.icon,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(action.label),+ ],+ ),+ ),+ )+ .toList();+ }++ final collectionViewType =+ getCollectionViewType(collection, Configuration.instance.getUserID()!);++ return [+ if (collectionViewType == CollectionViewType.ownedCollection ||+ collectionViewType == CollectionViewType.hiddenOwnedCollection ||+ collectionViewType == CollectionViewType.quickLink)+ PopupMenuItem<String>(+ value: 'edit',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedEdit02,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.edit),+ ],+ ),+ ),+ if (collectionViewType == CollectionViewType.ownedCollection ||+ collectionViewType == CollectionViewType.hiddenOwnedCollection ||+ collectionViewType == CollectionViewType.quickLink)+ PopupMenuItem<String>(+ value: 'delete',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedDelete01,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.delete),+ ],+ ),+ ),+ if (collectionViewType == CollectionViewType.sharedCollection)+ PopupMenuItem<String>(+ value: 'leave_collection',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedLogout02,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.leaveCollection),+ ],+ ),+ ),+ ];+ }++ /// Handles popup menu actions for collections+ ///+ /// This method centralizes all collection action handling:+ /// - Custom overflow actions+ /// - Edit collection (rename)+ /// - Delete collection+ /// - Leave shared collection+ ///+ /// Optional callbacks can be provided to override default behavior+ static void handleMenuAction(+ BuildContext context,+ String action,+ Collection collection,+ List<OverflowMenuAction>? overflowActions, {+ VoidCallback? onEditCallback,+ VoidCallback? onDeleteCallback,+ VoidCallback? onLeaveCollectionCallback,+ }) {+ if (overflowActions != null && overflowActions.isNotEmpty) {+ final customAction = overflowActions.firstWhere(+ (a) => a.id == action,+ orElse: () => throw StateError('Action not found'),+ );+ customAction.onTap(context, null, collection);+ return;+ }++ switch (action) {+ case 'edit':+ if (onEditCallback != null) {+ onEditCallback();+ } else {+ editCollection(context, collection);+ }+ break;+ case 'delete':+ if (onDeleteCallback != null) {+ onDeleteCallback();+ } else {+ deleteCollection(context, collection);+ }+ break;+ case 'leave_collection':+ if (onLeaveCollectionCallback != null) {+ onLeaveCollectionCallback();+ } else {+ leaveCollection(context, collection);+ }+ break;+ }+ }++ /// Opens the collection page+ ///+ /// This is a centralized navigation helper that can be used by both+ /// CollectionRowWidget and CollectionListWidget+ static void openCollection(BuildContext context, Collection collection) {+ Navigator.of(context).push(+ MaterialPageRoute(+ builder: (context) => CollectionPage(collection: collection),+ ),+ );+ }++ /// Shows a dialog to edit/rename a collection+ ///+ /// This method wraps CollectionActions.editCollection and ensures+ /// the UI is updated after a successful rename+ static Future<void> editCollection(+ BuildContext context,+ Collection collection,+ ) async {+ await CollectionActions.editCollection(+ context,+ collection,+ onSuccess: () {+ Bus.instance.fire(CollectionsUpdatedEvent());+ },+ );+ }++ /// Shows a confirmation dialog and deletes a collection+ ///+ /// This method wraps CollectionActions.deleteCollection and ensures+ /// the UI is updated after a successful deletion+ static Future<void> deleteCollection(+ BuildContext context,+ Collection collection,+ ) async {+ await CollectionActions.deleteCollection(+ context,+ collection,+ onSuccess: () {+ Bus.instance.fire(CollectionsUpdatedEvent());+ },+ );+ }++ /// Shows a confirmation dialog and leaves a shared collection+ ///+ /// This method wraps CollectionActions.leaveCollection and ensures+ /// the UI is updated after successfully leaving+ static Future<void> leaveCollection(+ BuildContext context,+ Collection collection,+ ) async {+ await CollectionActions.leaveCollection(+ context,+ collection,+ onSuccess: () {+ Bus.instance.fire(CollectionsUpdatedEvent());+ },+ );+ }+}diff --git a/mobile/apps/locker/lib/ui/components/collection_row_widget.dart b/mobile/apps/locker/lib/ui/components/collection_row_widget.dartindex d01bde33f5..99b9f752f9 100644--- a/mobile/apps/locker/lib/ui/components/collection_row_widget.dart+++ b/mobile/apps/locker/lib/ui/components/collection_row_widget.dart@@ -5,6 +5,7 @@ import "package:locker/l10n/l10n.dart";import "package:locker/models/selected_collections.dart";import "package:locker/services/collections/collections_service.dart";import "package:locker/services/collections/models/collection.dart";+import "package:locker/ui/components/collection_popup_menu_builder.dart";import "package:locker/ui/components/item_list_view.dart";class CollectionRowWidget extends StatelessWidget {@@ -83,28 +84,72 @@ class CollectionRowWidget extends StatelessWidget {color: colorScheme.iconColor,),),- const SizedBox(height: 12),- Text(- collectionName,- style: textTheme.bodyBold,- textAlign: TextAlign.left,- overflow: TextOverflow.ellipsis,- maxLines: 1,- ),- const SizedBox(height: 4),- FutureBuilder<int>(- future: CollectionService.instance.getFileCount(collection),- builder: (context, snapshot) {- final fileCount = snapshot.data ?? 0;- return Text(- context.l10n.items(fileCount),- style: textTheme.small.copyWith(- color: colorScheme.textMuted,+ const Spacer(),+ Row(+ crossAxisAlignment: CrossAxisAlignment.end,+ mainAxisAlignment: MainAxisAlignment.spaceBetween,+ children: [+ Expanded(+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(+ collectionName,+ style: textTheme.bodyBold,+ textAlign: TextAlign.left,+ overflow: TextOverflow.ellipsis,+ maxLines: 1,+ ),+ const SizedBox(height: 4),+ FutureBuilder<int>(+ future: CollectionService.instance+ .getFileCount(collection),+ builder: (context, snapshot) {+ final fileCount = snapshot.data ?? 0;+ return Text(+ context.l10n.items(fileCount),+ style: textTheme.small.copyWith(+ color: colorScheme.textMuted,+ ),+ textAlign: TextAlign.left,+ );+ },+ ),+ ],),- textAlign: TextAlign.left,- );- },+ ),+ const SizedBox(width: 4),+ AnimatedSwitcher(+ duration: const Duration(milliseconds: 200),+ switchInCurve: Curves.easeOut,+ switchOutCurve: Curves.easeIn,+ child: isSelected+ ? const SizedBox.shrink()+ : PopupMenuButton<String>(+ onSelected: (value) =>+ CollectionPopupMenuBuilder.handleMenuAction(+ context,+ value,+ collection,+ overflowActions,+ ),+ child: HugeIcon(+ icon: HugeIcons.strokeRoundedMoreVertical,+ color: colorScheme.iconColor,+ ),+ itemBuilder: (BuildContext context) {+ return CollectionPopupMenuBuilder+ .buildPopupMenuItems(+ context,+ collection,+ overflowActions,+ );+ },+ ),+ ),+ ],),+ const SizedBox(height: 4),],),);diff --git a/mobile/apps/locker/lib/ui/components/file_list_widget.dart b/mobile/apps/locker/lib/ui/components/file_list_widget.dartindex 98de4c8550..f7e22d2515 100644--- a/mobile/apps/locker/lib/ui/components/file_list_widget.dart+++ b/mobile/apps/locker/lib/ui/components/file_list_widget.dart@@ -1,40 +1,17 @@-import "dart:io";--import "package:ente_ui/components/buttons/button_widget.dart";import "package:ente_ui/components/buttons/icon_button_widget.dart";-import "package:ente_ui/components/buttons/models/button_type.dart";import "package:ente_ui/theme/ente_theme.dart";-import "package:ente_ui/utils/dialog_util.dart";import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";-import "package:locker/l10n/l10n.dart";-import "package:locker/models/info/info_item.dart";import "package:locker/models/selected_files.dart";-import "package:locker/services/collections/collections_service.dart";-import "package:locker/services/collections/models/collection.dart";-import "package:locker/services/configuration.dart";-import "package:locker/services/files/download/file_downloader.dart";-import "package:locker/services/files/links/links_service.dart";-import "package:locker/services/files/sync/metadata_updater_service.dart";import "package:locker/services/files/sync/models/file.dart";import "package:locker/services/info_file_service.dart";-import "package:locker/ui/components/file_edit_dialog.dart";-import "package:locker/ui/components/file_popup_menu_builder.dart";+import "package:locker/ui/components/file_popup_menu_widget.dart";import "package:locker/ui/components/item_list_view.dart";-import "package:locker/ui/components/share_link_dialog.dart";-import "package:locker/ui/pages/account_credentials_page.dart";-import "package:locker/ui/pages/base_info_page.dart";-import "package:locker/ui/pages/emergency_contact_page.dart";-import "package:locker/ui/pages/personal_note_page.dart";-import "package:locker/ui/pages/physical_records_page.dart";import "package:locker/utils/file_icon_utils.dart";import "package:locker/utils/info_item_utils.dart";-import "package:locker/utils/snack_bar_utils.dart";-import "package:open_file/open_file.dart";class FileListWidget extends StatelessWidget {final EnteFile file;- final List<Collection> collections;final List<OverflowMenuAction>? overflowActions;final bool isLastItem;final SelectedFiles? selectedFiles;@@ -44,7 +21,6 @@ class FileListWidget extends StatelessWidget {const FileListWidget({super.key,required this.file,- required this.collections,this.overflowActions,this.isLastItem = false,this.selectedFiles,@@ -88,14 +64,14 @@ class FileListWidget extends StatelessWidget {if (onTapCallback != null) {onTapCallback!(file);} else {- _openFile(context);+ FilePopupMenuWidget.openFile(context, file);}},onLongPress: () {if (onLongPressCallback != null) {onLongPressCallback!(file);} else {- _openFile(context);+ FilePopupMenuWidget.openFile(context, file);}},behavior: HitTestBehavior.opaque,@@ -133,9 +109,9 @@ class FileListWidget extends StatelessWidget {iconButtonType: IconButtonType.secondary,iconColor: colorScheme.primary700,)- : PopupMenuButton<String>(- onSelected: (value) =>- _handleMenuAction(context, value),+ : FilePopupMenuWidget(+ file: file,+ overflowActions: overflowActions,child: Padding(padding: const EdgeInsets.all(12.0),child: HugeIcon(@@ -143,12 +119,6 @@ class FileListWidget extends StatelessWidget {color: getEnteColorScheme(context).iconColor,),),- itemBuilder: (BuildContext context) {- return FilePopupMenuBuilder.buildPopupMenuItems(- context,- overflowActions,- );- },),),),@@ -160,206 +130,6 @@ class FileListWidget extends StatelessWidget {);}- void _handleMenuAction(BuildContext context, String action) {- if (overflowActions != null && overflowActions!.isNotEmpty) {- final customAction = overflowActions!.firstWhere(- (a) => a.id == action,- orElse: () => throw StateError('Action not found'),- );- customAction.onTap(context, file, null);- } else {- switch (action) {- case 'edit':- _showEditDialog(context);- break;- case 'share_link':- _shareLink(context);- break;- case 'delete':- _showDeleteConfirmationDialog(context);- break;- }- }- }-- Future<void> _shareLink(BuildContext context) async {- final dialog = createProgressDialog(- context,- context.l10n.creatingShareLink,- isDismissible: false,- );-- try {- await dialog.show();-- // Get or create the share link- final shareableLink = await LinksService.instance.getOrCreateLink(file);-- await dialog.hide();-- // Show the link dialog with copy and delete options- if (context.mounted) {- await showShareLinkDialog(- context,- shareableLink.fullURL!,- shareableLink.linkID,- file,- );- }- } catch (e) {- await dialog.hide();-- if (context.mounted) {- SnackBarUtils.showWarningSnackBar(- context,- '${context.l10n.failedToCreateShareLink}: ${e.toString()}',- );- }- }- }-- Future<void> _showDeleteConfirmationDialog(BuildContext context) async {- final result = await showChoiceDialog(- context,- title: context.l10n.deleteFile,- body: context.l10n.deleteFileConfirmation(file.displayName),- firstButtonLabel: context.l10n.delete,- secondButtonLabel: context.l10n.cancel,- firstButtonType: ButtonType.critical,- isCritical: true,- );-- if (result?.action == ButtonAction.first && context.mounted) {- await _deleteFile(context);- }- }-- Future<void> _deleteFile(BuildContext context) async {- final dialog = createProgressDialog(- context,- context.l10n.deletingFile,- isDismissible: false,- );-- try {- await dialog.show();-- final collections =- await CollectionService.instance.getCollectionsForFile(file);- if (collections.isNotEmpty) {- await CollectionService.instance.trashFile(file, collections.first);- }-- await dialog.hide();- if (context.mounted) {- SnackBarUtils.showInfoSnackBar(- context,- context.l10n.fileDeletedSuccessfully,- );- }- } catch (e) {- await dialog.hide();-- if (context.mounted) {- SnackBarUtils.showWarningSnackBar(- context,- context.l10n.failedToDeleteFile(e.toString()),- );- }- }- }-- Future<void> _showEditDialog(BuildContext context) async {- final allCollections = await CollectionService.instance.getCollections();- allCollections.removeWhere(- (c) => c.type == CollectionType.uncategorized,- );-- final result = await showFileEditDialog(- context,- file: file,- collections: allCollections,- );-- if (result != null && context.mounted) {- List<Collection> currentCollections;- try {- currentCollections =- await CollectionService.instance.getCollectionsForFile(file);- } catch (e) {- currentCollections = <Collection>[];- }-- final currentCollectionsSet = currentCollections.toSet();-- final newCollectionsSet = result.selectedCollections.toSet();-- final collectionsToAdd =- newCollectionsSet.difference(currentCollectionsSet).toList();-- final collectionsToRemove =- currentCollectionsSet.difference(newCollectionsSet).toList();-- final currentTitle = file.displayName;- final currentCaption = file.caption ?? '';- final hasMetadataChanged =- result.title != currentTitle || result.caption != currentCaption;-- if (hasMetadataChanged || currentCollectionsSet != newCollectionsSet) {- final dialog = createProgressDialog(- context,- context.l10n.pleaseWait,- isDismissible: false,- );- await dialog.show();-- try {- final List<Future<void>> apiCalls = [];- for (final collection in collectionsToAdd) {- apiCalls.add(- CollectionService.instance.addToCollection(collection, file),- );- }- await Future.wait(apiCalls);- apiCalls.clear();-- for (final collection in collectionsToRemove) {- apiCalls.add(- CollectionService.instance- .move(file, collection, newCollectionsSet.first),- );- }- if (hasMetadataChanged) {- apiCalls.add(- MetadataUpdaterService.instance- .editFileNameAndCaption(file, result.title, result.caption),- );- }- await Future.wait(apiCalls);-- await dialog.hide();-- SnackBarUtils.showInfoSnackBar(- context,- context.l10n.fileUpdatedSuccessfully,- );- } catch (e) {- await dialog.hide();-- SnackBarUtils.showWarningSnackBar(- context,- context.l10n.failedToUpdateFile(e.toString()),- );- }- } else {- SnackBarUtils.showWarningSnackBar(- context,- context.l10n.noChangesWereMade,- );- }- }- }-Widget _buildFileIcon() {// Check if this is an info fileif (InfoFileService.instance.isInfoFile(file)) {@@ -376,142 +146,4 @@ class FileListWidget extends StatelessWidget {// For non-info files or if extraction fails, use the original logicreturn FileIconUtils.getFileIcon(file.displayName, showBackground: true);}-- Future<void> _openFile(BuildContext context) async {- // Check if this is an info file- if (InfoFileService.instance.isInfoFile(file)) {- return _openInfoFile(context);- }-- if (file.localPath != null) {- final localFile = File(file.localPath!);- if (await localFile.exists()) {- await _launchFile(context, localFile, file.displayName);- return;- }- }-- final String cachedFilePath =- "${Configuration.instance.getCacheDirectory()}${file.displayName}";- final File cachedFile = File(cachedFilePath);- if (await cachedFile.exists()) {- await _launchFile(context, cachedFile, file.displayName);- return;- }-- final dialog = createProgressDialog(- context,- context.l10n.downloading,- isDismissible: false,- );-- try {- await dialog.show();- final fileKey = await CollectionService.instance.getFileKey(file);- final decryptedFile = await downloadAndDecrypt(- file,- fileKey,- progressCallback: (downloaded, total) {- if (total > 0 && downloaded >= 0) {- final percentage =- ((downloaded / total) * 100).clamp(0, 100).round();- dialog.update(- message: context.l10n.downloadingProgress(percentage),- );- } else {- dialog.update(message: context.l10n.downloading);- }- },- shouldUseCache: true,- );-- await dialog.hide();-- if (decryptedFile != null) {- await _launchFile(context, decryptedFile, file.displayName);- } else {- await showErrorDialog(- context,- context.l10n.downloadFailed,- context.l10n.failedToDownloadOrDecrypt,- );- }- } catch (e) {- await dialog.hide();- await showErrorDialog(- context,- context.l10n.errorOpeningFile,- context.l10n.errorOpeningFileMessage(e.toString()),- );- }- }-- Future<void> _openInfoFile(BuildContext context) async {- try {- final infoItem = InfoFileService.instance.extractInfoFromFile(file);- if (infoItem == null) {- await showErrorDialog(- context,- context.l10n.errorOpeningFile,- 'Unable to extract information from this file',- );- return;- }-- // Navigate to the appropriate page based on info type in view mode- Widget page;- switch (infoItem.type) {- case InfoType.note:- page = PersonalNotePage(- mode: InfoPageMode.view,- existingFile: file,- );- break;- case InfoType.accountCredential:- page = AccountCredentialsPage(- mode: InfoPageMode.view,- existingFile: file,- );- break;- case InfoType.physicalRecord:- page = PhysicalRecordsPage(- mode: InfoPageMode.view,- existingFile: file,- );- break;- case InfoType.emergencyContact:- page = EmergencyContactPage(- mode: InfoPageMode.view,- existingFile: file,- );- break;- }-- await Navigator.of(context).push(- MaterialPageRoute(builder: (context) => page),- );- } catch (e) {- await showErrorDialog(- context,- context.l10n.errorOpeningFile,- 'Failed to open info file: ${e.toString()}',- );- }- }-- Future<void> _launchFile(- BuildContext context,- File file,- String fileName,- ) async {- try {- await OpenFile.open(file.path);- } catch (e) {- await showErrorDialog(- context,- context.l10n.errorOpeningFile,- context.l10n.couldNotOpenFile(e.toString()),- );- }- }}diff --git a/mobile/apps/locker/lib/ui/components/file_popup_menu_builder.dart b/mobile/apps/locker/lib/ui/components/file_popup_menu_builder.dartindex 481258d703..1101dcfcd4 100644--- a/mobile/apps/locker/lib/ui/components/file_popup_menu_builder.dart+++ b/mobile/apps/locker/lib/ui/components/file_popup_menu_builder.dart@@ -1,6 +1,7 @@import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";import "package:locker/l10n/l10n.dart";+import "package:locker/services/files/sync/models/file.dart";import "package:locker/ui/components/item_list_view.dart";class FilePopupMenuBuilder {@@ -15,8 +16,8 @@ class FilePopupMenuBuilder {value: action.id,child: Row(children: [- const HugeIcon(- icon: HugeIcons.strokeRoundedFile02,+ Icon(+ action.icon,size: 16,),const SizedBox(width: 8),@@ -26,48 +27,85 @@ class FilePopupMenuBuilder {),).toList();- } else {- return [- PopupMenuItem<String>(- value: 'edit',- child: Row(- children: [- const HugeIcon(- icon: HugeIcons.strokeRoundedEdit02,- size: 16,- ),- const SizedBox(width: 8),- Text(context.l10n.edit),- ],- ),+ }++ return [+ PopupMenuItem<String>(+ value: 'edit',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedEdit02,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.edit),+ ],),- PopupMenuItem<String>(- value: 'share_link',- child: Row(- children: [- const HugeIcon(- icon: HugeIcons.strokeRoundedShare03,- size: 16,- ),- const SizedBox(width: 8),- Text(context.l10n.share),- ],- ),+ ),+ PopupMenuItem<String>(+ value: 'share_link',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedShare03,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.share),+ ],),- PopupMenuItem<String>(- value: 'delete',- child: Row(- children: [- const HugeIcon(- icon: HugeIcons.strokeRoundedDelete01,- size: 16,- ),- const SizedBox(width: 8),- Text(context.l10n.delete),- ],- ),+ ),+ PopupMenuItem<String>(+ value: 'delete',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedDelete01,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.delete),+ ],),- ];+ ),+ ];+ }++ static void handleMenuAction(+ BuildContext context,+ String action,+ EnteFile file,+ List<OverflowMenuAction>? overflowActions, {+ VoidCallback? onEditCallback,+ VoidCallback? onShareLinkCallback,+ VoidCallback? onDeleteCallback,+ }) {+ if (overflowActions != null && overflowActions.isNotEmpty) {+ final customAction = overflowActions.firstWhere(+ (a) => a.id == action,+ orElse: () => throw StateError('Action not found'),+ );+ customAction.onTap(context, file, null);+ return;+ }++ switch (action) {+ case 'edit':+ if (onEditCallback != null) {+ onEditCallback();+ }+ break;+ case 'share_link':+ if (onShareLinkCallback != null) {+ onShareLinkCallback();+ }+ break;+ case 'delete':+ if (onDeleteCallback != null) {+ onDeleteCallback();+ }+ break;}}}diff --git a/mobile/apps/locker/lib/ui/components/file_popup_menu_widget.dart b/mobile/apps/locker/lib/ui/components/file_popup_menu_widget.dartnew file mode 100644index 0000000000..5dbb897bb9--- /dev/null+++ b/mobile/apps/locker/lib/ui/components/file_popup_menu_widget.dart@@ -0,0 +1,452 @@+import "dart:io";++import "package:ente_ui/components/buttons/button_widget.dart";+import "package:ente_ui/components/buttons/models/button_type.dart";+import "package:ente_ui/theme/ente_theme.dart";+import "package:ente_ui/utils/dialog_util.dart";+import "package:flutter/material.dart";+import "package:hugeicons/hugeicons.dart";+import "package:locker/l10n/l10n.dart";+import "package:locker/models/info/info_item.dart";+import "package:locker/services/collections/collections_service.dart";+import "package:locker/services/collections/models/collection.dart";+import "package:locker/services/configuration.dart";+import "package:locker/services/files/download/file_downloader.dart";+import "package:locker/services/files/links/links_service.dart";+import "package:locker/services/files/sync/metadata_updater_service.dart";+import "package:locker/services/files/sync/models/file.dart";+import "package:locker/services/info_file_service.dart";+import "package:locker/ui/components/file_edit_dialog.dart";+import "package:locker/ui/components/item_list_view.dart";+import "package:locker/ui/components/share_link_dialog.dart";+import "package:locker/ui/pages/account_credentials_page.dart";+import "package:locker/ui/pages/base_info_page.dart";+import "package:locker/ui/pages/emergency_contact_page.dart";+import "package:locker/ui/pages/personal_note_page.dart";+import "package:locker/ui/pages/physical_records_page.dart";+import "package:locker/utils/snack_bar_utils.dart";+import "package:open_file/open_file.dart";++class FilePopupMenuWidget extends StatelessWidget {+ final EnteFile file;+ final List<OverflowMenuAction>? overflowActions;+ final Widget? child;++ const FilePopupMenuWidget({+ super.key,+ required this.file,+ this.overflowActions,+ this.child,+ });++ @override+ Widget build(BuildContext context) {+ return PopupMenuButton<String>(+ onSelected: (value) => _handleMenuAction(context, value),+ child: child ??+ HugeIcon(+ icon: HugeIcons.strokeRoundedMoreVertical,+ color: getEnteColorScheme(context).iconColor,+ ),+ itemBuilder: (BuildContext context) {+ return _buildPopupMenuItems(context);+ },+ );+ }++ List<PopupMenuItem<String>> _buildPopupMenuItems(BuildContext context) {+ if (overflowActions != null && overflowActions!.isNotEmpty) {+ return overflowActions!+ .map(+ (action) => PopupMenuItem<String>(+ value: action.id,+ child: Row(+ children: [+ Icon(+ action.icon,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(action.label),+ ],+ ),+ ),+ )+ .toList();+ }++ return [+ PopupMenuItem<String>(+ value: 'edit',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedEdit02,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.edit),+ ],+ ),+ ),+ PopupMenuItem<String>(+ value: 'share_link',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedShare03,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.share),+ ],+ ),+ ),+ PopupMenuItem<String>(+ value: 'delete',+ child: Row(+ children: [+ const HugeIcon(+ icon: HugeIcons.strokeRoundedDelete01,+ size: 16,+ ),+ const SizedBox(width: 8),+ Text(context.l10n.delete),+ ],+ ),+ ),+ ];+ }++ void _handleMenuAction(BuildContext context, String action) {+ if (overflowActions != null && overflowActions!.isNotEmpty) {+ final customAction = overflowActions!.firstWhere(+ (a) => a.id == action,+ orElse: () => throw StateError('Action not found'),+ );+ customAction.onTap(context, file, null);+ return;+ }++ switch (action) {+ case 'edit':+ _showEditDialog(context);+ break;+ case 'share_link':+ _shareLink(context);+ break;+ case 'delete':+ _showDeleteConfirmationDialog(context);+ break;+ }+ }++ Future<void> _shareLink(BuildContext context) async {+ final dialog = createProgressDialog(+ context,+ context.l10n.creatingShareLink,+ isDismissible: false,+ );++ try {+ await dialog.show();++ final shareableLink = await LinksService.instance.getOrCreateLink(file);++ await dialog.hide();++ if (context.mounted) {+ await showShareLinkDialog(+ context,+ shareableLink.fullURL!,+ shareableLink.linkID,+ file,+ );+ }+ } catch (e) {+ await dialog.hide();++ if (context.mounted) {+ SnackBarUtils.showWarningSnackBar(+ context,+ '${context.l10n.failedToCreateShareLink}: ${e.toString()}',+ );+ }+ }+ }++ Future<void> _showDeleteConfirmationDialog(BuildContext context) async {+ final result = await showChoiceDialog(+ context,+ title: context.l10n.deleteFile,+ body: context.l10n.deleteFileConfirmation(file.displayName),+ firstButtonLabel: context.l10n.delete,+ secondButtonLabel: context.l10n.cancel,+ firstButtonType: ButtonType.critical,+ isCritical: true,+ );++ if (result?.action == ButtonAction.first && context.mounted) {+ await _deleteFile(context);+ }+ }++ Future<void> _deleteFile(BuildContext context) async {+ final dialog = createProgressDialog(+ context,+ context.l10n.deletingFile,+ isDismissible: false,+ );++ try {+ await dialog.show();++ final collections =+ await CollectionService.instance.getCollectionsForFile(file);+ if (collections.isNotEmpty) {+ await CollectionService.instance.trashFile(file, collections.first);+ }++ await dialog.hide();+ if (context.mounted) {+ SnackBarUtils.showInfoSnackBar(+ context,+ context.l10n.fileDeletedSuccessfully,+ );+ }+ } catch (e) {+ await dialog.hide();++ if (context.mounted) {+ SnackBarUtils.showWarningSnackBar(+ context,+ context.l10n.failedToDeleteFile(e.toString()),+ );+ }+ }+ }++ Future<void> _showEditDialog(BuildContext context) async {+ final allCollections = await CollectionService.instance.getCollections();+ allCollections.removeWhere(+ (c) => c.type == CollectionType.uncategorized,+ );++ final result = await showFileEditDialog(+ context,+ file: file,+ collections: allCollections,+ );++ if (result != null && context.mounted) {+ List<Collection> currentCollections;+ try {+ currentCollections =+ await CollectionService.instance.getCollectionsForFile(file);+ } catch (e) {+ currentCollections = <Collection>[];+ }++ final currentCollectionsSet = currentCollections.toSet();+ final newCollectionsSet = result.selectedCollections.toSet();+ final collectionsToAdd =+ newCollectionsSet.difference(currentCollectionsSet).toList();+ final collectionsToRemove =+ currentCollectionsSet.difference(newCollectionsSet).toList();++ final currentTitle = file.displayName;+ final currentCaption = file.caption ?? '';+ final hasMetadataChanged =+ result.title != currentTitle || result.caption != currentCaption;++ if (hasMetadataChanged || currentCollectionsSet != newCollectionsSet) {+ final dialog = createProgressDialog(+ context,+ context.l10n.pleaseWait,+ isDismissible: false,+ );+ await dialog.show();++ try {+ final List<Future<void>> apiCalls = [];+ for (final collection in collectionsToAdd) {+ apiCalls.add(+ CollectionService.instance.addToCollection(collection, file),+ );+ }+ await Future.wait(apiCalls);+ apiCalls.clear();++ for (final collection in collectionsToRemove) {+ apiCalls.add(+ CollectionService.instance+ .move(file, collection, newCollectionsSet.first),+ );+ }+ if (hasMetadataChanged) {+ apiCalls.add(+ MetadataUpdaterService.instance+ .editFileNameAndCaption(file, result.title, result.caption),+ );+ }+ await Future.wait(apiCalls);++ await dialog.hide();++ SnackBarUtils.showInfoSnackBar(+ context,+ context.l10n.fileUpdatedSuccessfully,+ );+ } catch (e) {+ await dialog.hide();++ SnackBarUtils.showWarningSnackBar(+ context,+ context.l10n.failedToUpdateFile(e.toString()),+ );+ }+ } else {+ SnackBarUtils.showWarningSnackBar(+ context,+ context.l10n.noChangesWereMade,+ );+ }+ }+ }++ static Future<void> openFile(BuildContext context, EnteFile file) async {+ if (InfoFileService.instance.isInfoFile(file)) {+ return _openInfoFile(context, file);+ }++ if (file.localPath != null) {+ final localFile = File(file.localPath!);+ if (await localFile.exists()) {+ await _launchFile(context, localFile, file.displayName);+ return;+ }+ }++ final String cachedFilePath =+ "${Configuration.instance.getCacheDirectory()}${file.displayName}";+ final File cachedFile = File(cachedFilePath);+ if (await cachedFile.exists()) {+ await _launchFile(context, cachedFile, file.displayName);+ return;+ }++ final dialog = createProgressDialog(+ context,+ context.l10n.downloading,+ isDismissible: false,+ );++ try {+ await dialog.show();+ final fileKey = await CollectionService.instance.getFileKey(file);+ final decryptedFile = await downloadAndDecrypt(+ file,+ fileKey,+ progressCallback: (downloaded, total) {+ if (total > 0 && downloaded >= 0) {+ final percentage =+ ((downloaded / total) * 100).clamp(0, 100).round();+ dialog.update(+ message: context.l10n.downloadingProgress(percentage),+ );+ } else {+ dialog.update(message: context.l10n.downloading);+ }+ },+ shouldUseCache: true,+ );++ await dialog.hide();++ if (decryptedFile != null) {+ await _launchFile(context, decryptedFile, file.displayName);+ } else {+ await showErrorDialog(+ context,+ context.l10n.downloadFailed,+ context.l10n.failedToDownloadOrDecrypt,+ );+ }+ } catch (e) {+ await dialog.hide();+ await showErrorDialog(+ context,+ context.l10n.errorOpeningFile,+ context.l10n.errorOpeningFileMessage(e.toString()),+ );+ }+ }++ static Future<void> _openInfoFile(BuildContext context, EnteFile file) async {+ try {+ final infoItem = InfoFileService.instance.extractInfoFromFile(file);+ if (infoItem == null) {+ await showErrorDialog(+ context,+ context.l10n.errorOpeningFile,+ 'Unable to extract information from this file',+ );+ return;+ }++ Widget page;+ switch (infoItem.type) {+ case InfoType.note:+ page = PersonalNotePage(+ mode: InfoPageMode.view,+ existingFile: file,+ );+ break;+ case InfoType.accountCredential:+ page = AccountCredentialsPage(+ mode: InfoPageMode.view,+ existingFile: file,+ );+ break;+ case InfoType.physicalRecord:+ page = PhysicalRecordsPage(+ mode: InfoPageMode.view,+ existingFile: file,+ );+ break;+ case InfoType.emergencyContact:+ page = EmergencyContactPage(+ mode: InfoPageMode.view,+ existingFile: file,+ );+ break;+ }++ await Navigator.of(context).push(+ MaterialPageRoute(builder: (context) => page),+ );+ } catch (e) {+ await showErrorDialog(+ context,+ context.l10n.errorOpeningFile,+ 'Failed to open info file: ${e.toString()}',+ );+ }+ }++ static Future<void> _launchFile(+ BuildContext context,+ File file,+ String fileName,+ ) async {+ try {+ await OpenFile.open(file.path);+ } catch (e) {+ await showErrorDialog(+ context,+ context.l10n.errorOpeningFile,+ context.l10n.couldNotOpenFile(e.toString()),+ );+ }+ }+}diff --git a/mobile/apps/locker/lib/ui/components/file_row_widget.dart b/mobile/apps/locker/lib/ui/components/file_row_widget.dartindex da6f4d9012..b2b95c475d 100644--- a/mobile/apps/locker/lib/ui/components/file_row_widget.dart+++ b/mobile/apps/locker/lib/ui/components/file_row_widget.dart@@ -1,10 +1,9 @@import "package:ente_ui/theme/ente_theme.dart";import "package:flutter/material.dart";-import "package:hugeicons/hugeicons.dart";import "package:locker/models/selected_files.dart";import "package:locker/services/files/sync/models/file.dart";import "package:locker/services/info_file_service.dart";-import "package:locker/ui/components/file_popup_menu_builder.dart";+import "package:locker/ui/components/file_popup_menu_widget.dart";import "package:locker/ui/components/item_list_view.dart";import "package:locker/utils/file_icon_utils.dart";import "package:locker/utils/info_item_utils.dart";@@ -85,19 +84,9 @@ class FileRowWidget extends StatelessWidget {),),const SizedBox(width: 4),- PopupMenuButton<String>(- // onSelected: (value) =>- // _handleMenuAction(context, value),- child: HugeIcon(- icon: HugeIcons.strokeRoundedMoreVertical,- color: getEnteColorScheme(context).iconColor,- ),- itemBuilder: (BuildContext context) {- return FilePopupMenuBuilder.buildPopupMenuItems(- context,- overflowActions,- );- },+ FilePopupMenuWidget(+ file: file,+ overflowActions: overflowActions,),],),diff --git a/mobile/apps/locker/lib/ui/components/item_list_view.dart b/mobile/apps/locker/lib/ui/components/item_list_view.dartindex 3565a57ede..1ea5657d9c 100644--- a/mobile/apps/locker/lib/ui/components/item_list_view.dart+++ b/mobile/apps/locker/lib/ui/components/item_list_view.dart@@ -256,7 +256,6 @@ class _ItemListViewState extends State<ItemListView> {} else {return FileListWidget(file: file,- collections: widget.collections,overflowActions: widget.fileOverflowActions,isLastItem: isLastItem,selectedFiles: widget.selectedFiles,