Skip to content

armgit / ente

Public Imported from GitHub
0

💚 End-to-end encrypted cloud for everything.

[mob][photos] Resolve merge conflicts and merge main

ashilkn4cfc38c4db6c
diff --cc mobile/lib/generated/intl/messages_cs.dart
index 0eb0b05c24,32ca64f668..48fedc432f
--- a/mobile/lib/generated/intl/messages_cs.dart
+++ b/mobile/lib/generated/intl/messages_cs.dart
@@@ -33,8 -33,9 +33,11 @@@ class MessageLookup extends MessageLook
MessageLookupByLibrary.simpleMessage("Add to hidden album"),
"addViewers": m1,
"appLock": MessageLookupByLibrary.simpleMessage("App lock"),
+ "appLockDescription": MessageLookupByLibrary.simpleMessage(
+ "Choose between your device\\\'s default lock screen and a custom lock screen with a PIN or password."),
+ "autoLock": MessageLookupByLibrary.simpleMessage("Auto lock"),
+ "autoLockFeatureDescription": MessageLookupByLibrary.simpleMessage(
+ "Time after which the app locks after being put in the background"),
"changeLocationOfSelectedItems": MessageLookupByLibrary.simpleMessage(
"Change location of selected items?"),
"clusteringProgress":
diff --cc mobile/lib/generated/intl/messages_ko.dart
index 5275c50c90,708ece870d..69edfe4e57
--- a/mobile/lib/generated/intl/messages_ko.dart
+++ b/mobile/lib/generated/intl/messages_ko.dart
@@@ -33,8 -33,9 +33,11 @@@ class MessageLookup extends MessageLook
MessageLookupByLibrary.simpleMessage("Add to hidden album"),
"addViewers": m1,
"appLock": MessageLookupByLibrary.simpleMessage("App lock"),
+ "appLockDescription": MessageLookupByLibrary.simpleMessage(
+ "Choose between your device\\\'s default lock screen and a custom lock screen with a PIN or password."),
+ "autoLock": MessageLookupByLibrary.simpleMessage("Auto lock"),
+ "autoLockFeatureDescription": MessageLookupByLibrary.simpleMessage(
+ "Time after which the app locks after being put in the background"),
"changeLocationOfSelectedItems": MessageLookupByLibrary.simpleMessage(
"Change location of selected items?"),
"clusteringProgress":
diff --cc mobile/lib/generated/intl/messages_no.dart
index 0cad585b90,a62644aecf..f36546a740
--- a/mobile/lib/generated/intl/messages_no.dart
+++ b/mobile/lib/generated/intl/messages_no.dart
@@@ -35,10 -35,11 +35,13 @@@ class MessageLookup extends MessageLook
MessageLookupByLibrary.simpleMessage("Add to hidden album"),
"addViewers": m1,
"appLock": MessageLookupByLibrary.simpleMessage("App lock"),
+ "appLockDescription": MessageLookupByLibrary.simpleMessage(
+ "Choose between your device\\\'s default lock screen and a custom lock screen with a PIN or password."),
"askDeleteReason": MessageLookupByLibrary.simpleMessage(
"Hva er hovedårsaken til at du sletter kontoen din?"),
+ "autoLock": MessageLookupByLibrary.simpleMessage("Auto lock"),
+ "autoLockFeatureDescription": MessageLookupByLibrary.simpleMessage(
+ "Time after which the app locks after being put in the background"),
"cancel": MessageLookupByLibrary.simpleMessage("Avbryt"),
"changeLocationOfSelectedItems": MessageLookupByLibrary.simpleMessage(
"Change location of selected items?"),
diff --cc mobile/lib/generated/l10n.dart
index 5288cd8be4,fb11225fe7..8112f043f4
--- a/mobile/lib/generated/l10n.dart
+++ b/mobile/lib/generated/l10n.dart
@@@ -9105,25 -9125,35 +9115,55 @@@ class S
);
}
+ /// `Choose between your device\'s default lock screen and a custom lock screen with a PIN or password.`
+ String get appLockDescription {
+ return Intl.message(
+ 'Choose between your device\\\'s default lock screen and a custom lock screen with a PIN or password.',
+ name: 'appLockDescription',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `Auto lock`
+ String get autoLock {
+ return Intl.message(
+ 'Auto lock',
+ name: 'autoLock',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `To enable swipe lock, please setup device passcode or screen lock in your system settings.`
+ String get swipeLockEnablePreSteps {
+ return Intl.message(
+ 'To enable swipe lock, please setup device passcode or screen lock in your system settings.',
+ name: 'swipeLockEnablePreSteps',
+ desc: '',
+ args: [],
+ );
+ }
++
+ /// `Immediately`
+ String get immediately {
+ return Intl.message(
+ 'Immediately',
+ name: 'immediately',
+ desc: '',
+ args: [],
+ );
+ }
+
+ /// `Time after which the app locks after being put in the background`
+ String get autoLockFeatureDescription {
+ return Intl.message(
+ 'Time after which the app locks after being put in the background',
+ name: 'autoLockFeatureDescription',
+ desc: '',
+ args: [],
+ );
+ }
}
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
diff --cc mobile/lib/l10n/intl_cs.arb
index fd37c9b31b,9db3619333..537df606a9
--- a/mobile/lib/l10n/intl_cs.arb
+++ b/mobile/lib/l10n/intl_cs.arb
@@@ -40,6 -40,7 +40,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_de.arb
index 5a8b7c5307,61b3a289db..9b19c77bad
--- a/mobile/lib/l10n/intl_de.arb
+++ b/mobile/lib/l10n/intl_de.arb
@@@ -1276,6 -1278,8 +1277,10 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "Um die App-Sperre zu aktivieren, konfigurieren Sie bitte den Gerätepasscode oder die Bildschirmsperre in Ihren Systemeinstellungen.",
"tapToUnlock": "Zum Entsperren antippen",
"tooManyIncorrectAttempts": "Zu viele fehlerhafte Versuche",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background",
+ "videoInfo": "Video-Informationen"
}
diff --cc mobile/lib/l10n/intl_en.arb
index 879839aa18,36a9f5cf6b..9187d18e54
--- a/mobile/lib/l10n/intl_en.arb
+++ b/mobile/lib/l10n/intl_en.arb
@@@ -1277,6 -1279,7 +1278,9 @@@
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
"videoInfo": "Video Info",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_es.arb
index f8a2ec3512,205e81b917..9147bb8577
--- a/mobile/lib/l10n/intl_es.arb
+++ b/mobile/lib/l10n/intl_es.arb
@@@ -1264,6 -1265,7 +1264,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_fr.arb
index 07bd7b5164,18cf84aa3f..dad4158c12
--- a/mobile/lib/l10n/intl_fr.arb
+++ b/mobile/lib/l10n/intl_fr.arb
@@@ -1181,6 -1182,7 +1181,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_it.arb
index 7c8a144b92,843d873f62..cb083b3960
--- a/mobile/lib/l10n/intl_it.arb
+++ b/mobile/lib/l10n/intl_it.arb
@@@ -1143,6 -1144,7 +1143,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_ko.arb
index fd37c9b31b,9db3619333..537df606a9
--- a/mobile/lib/l10n/intl_ko.arb
+++ b/mobile/lib/l10n/intl_ko.arb
@@@ -40,6 -40,7 +40,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_nl.arb
index fdee09b1f8,b794ac90c0..d5b515d935
--- a/mobile/lib/l10n/intl_nl.arb
+++ b/mobile/lib/l10n/intl_nl.arb
@@@ -1276,6 -1277,7 +1276,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "Om vergrendelscherm in te schakelen, moet u een toegangscode of schermvergrendeling instellen in uw systeeminstellingen.",
"tapToUnlock": "Tik om te ontgrendelen",
"tooManyIncorrectAttempts": "Te veel onjuiste pogingen",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_no.arb
index 0634e66186,3fa08787d4..9c1be2666d
--- a/mobile/lib/l10n/intl_no.arb
+++ b/mobile/lib/l10n/intl_no.arb
@@@ -54,6 -54,7 +54,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_pl.arb
index ddb98b5456,8b27a0434b..164ee9447e
--- a/mobile/lib/l10n/intl_pl.arb
+++ b/mobile/lib/l10n/intl_pl.arb
@@@ -529,14 -529,15 +529,14 @@@
"general": "Ogólne",
"security": "Bezpieczeństwo",
"authToViewYourRecoveryKey": "Proszę uwierzytelnić się, aby wyświetlić swój klucz odzyskiwania",
- "twofactor": "Uwierzytelnianie dwuetapowe",
- "authToConfigureTwofactorAuthentication": "Uwierzytelnij się, aby skonfigurować uwierzytelnianie dwuskładnikowe",
+ "twofactor": "Uwierzytelnianie dwustopniowe",
+ "authToConfigureTwofactorAuthentication": "Uwierzytelnij się, aby skonfigurować uwierzytelnianie dwustopniowe",
"lockscreen": "Ekran blokady",
"authToChangeLockscreenSetting": "Proszę uwierzytelnić się, aby zmienić ustawienia ekranu blokady",
- "lockScreenEnablePreSteps": "Aby włączyć ekran blokady, ustaw hasło urządzenia lub blokadę ekranu w ustawieniach systemu.",
"viewActiveSessions": "Zobacz aktywne sesje",
"authToViewYourActiveSessions": "Proszę uwierzytelnić, aby wyświetlić swoje aktywne sesje",
- "disableTwofactor": "Wyłącz Uwierzytelnianie Dwuetapowe",
- "confirm2FADisable": "Czy na pewno chcesz wyłączyć uwierzytelnianie dwuetapowe?",
+ "disableTwofactor": "Wyłącz uwierzytelnianie dwustopniowe",
+ "confirm2FADisable": "Czy na pewno chcesz wyłączyć uwierzytelnianie dwustopniowe?",
"no": "Nie",
"yes": "Tak",
"social": "Społeczność",
@@@ -1276,6 -1278,8 +1277,10 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "Aby włączyć blokadę aplikacji, należy skonfigurować hasło urządzenia lub blokadę ekranu w ustawieniach systemu.",
"tapToUnlock": "Naciśnij, aby odblokować",
"tooManyIncorrectAttempts": "Zbyt wiele błędnych prób",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background",
+ "videoInfo": "Informacje Wideo"
}
diff --cc mobile/lib/l10n/intl_pt.arb
index 8f72159815,72e8cff0d1..24d6a39434
--- a/mobile/lib/l10n/intl_pt.arb
+++ b/mobile/lib/l10n/intl_pt.arb
@@@ -1276,6 -1277,7 +1276,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "Para ativar o bloqueio de app, por favor ative um método de autenticação nas configurações do sistema do seu dispositivo.",
"tapToUnlock": "Toque para desbloquear",
"tooManyIncorrectAttempts": "Muitas tentativas incorretas",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_ru.arb
index a910e38bae,ef7e738ef7..839bfc528e
--- a/mobile/lib/l10n/intl_ru.arb
+++ b/mobile/lib/l10n/intl_ru.arb
@@@ -1263,6 -1264,7 +1263,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_tr.arb
index e180467eb1,d9e5416704..05ad9a5189
--- a/mobile/lib/l10n/intl_tr.arb
+++ b/mobile/lib/l10n/intl_tr.arb
@@@ -1275,6 -1276,7 +1275,9 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "To enable app lock, please setup device passcode or screen lock in your system settings.",
"tapToUnlock": "Tap to unlock",
"tooManyIncorrectAttempts": "Too many incorrect attempts",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background"
}
diff --cc mobile/lib/l10n/intl_zh.arb
index cdcccb5645,c4218975bd..a17920067b
--- a/mobile/lib/l10n/intl_zh.arb
+++ b/mobile/lib/l10n/intl_zh.arb
@@@ -1276,6 -1278,8 +1277,10 @@@
"toEnableAppLockPleaseSetupDevicePasscodeOrScreen": "要启用应用锁,请在系统设置中设置设备密码或屏幕锁定。",
"tapToUnlock": "点击解锁",
"tooManyIncorrectAttempts": "错误尝试次数过多",
+ "appLockDescription": "Choose between your device\\'s default lock screen and a custom lock screen with a PIN or password.",
- "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings."
++ "swipeLockEnablePreSteps": "To enable swipe lock, please setup device passcode or screen lock in your system settings.",
+ "autoLock": "Auto lock",
+ "immediately": "Immediately",
+ "autoLockFeatureDescription": "Time after which the app locks after being put in the background",
+ "videoInfo": "视频详情"
}
diff --cc mobile/lib/ui/viewer/file/file_bottom_bar.dart
index e3fa46ff6c,a06824cf27..5183a7dba2
--- a/mobile/lib/ui/viewer/file/file_bottom_bar.dart
+++ b/mobile/lib/ui/viewer/file/file_bottom_bar.dart
@@@ -4,9 -3,8 +4,10 @@@ import 'dart:io'
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import "package:logging/logging.dart";
+import "package:photos/core/event_bus.dart";
+import "package:photos/events/file_swipe_lock_event.dart";
import "package:photos/generated/l10n.dart";
+ import "package:photos/models/file/extensions/file_props.dart";
import 'package:photos/models/file/file.dart';
import 'package:photos/models/file/file_type.dart';
import 'package:photos/models/file/trash_file.dart';
@@@ -42,9 -44,8 +47,11 @@@ class FileBottomBar extends StatefulWid
class FileBottomBarState extends State<FileBottomBar> {
final GlobalKey shareButtonKey = GlobalKey();
+ bool _isFileSwipeLocked = false;
+ late final StreamSubscription<FileSwipeLockEvent>
+ _fileSwipeLockEventSubscription;
+ bool isPanorama = false;
+ int? lastFileGenID;
@override
void initState() {
@@@ -65,9 -54,27 +72,27 @@@
@override
Widget build(BuildContext context) {
+ if (flagService.internalUser) {
+ isPanorama = widget.file.isPanorama() ?? false;
+ _checkPanorama();
+ }
- return _getBottomBar();
+ return _isFileSwipeLocked ? Container() : _getBottomBar();
}
+ // _checkPanorama() method is used to check if the file is a panorama image.
+ // This handles the case when the the file dims (width and height) are not available.
+ Future<void> _checkPanorama() async {
+ if (lastFileGenID == widget.file.generatedID) {
+ return;
+ }
+ lastFileGenID = widget.file.generatedID;
+ final result = await checkIfPanorama(widget.file);
+ if (mounted && isPanorama == !result) {
+ isPanorama = result;
+ setState(() {});
+ }
+ }
+
void safeRefresh() {
if (mounted) {
setState(() {});