[mob][photos] Show app content (#2522)
**Toggle Implementation:** Added a new feature in the app settings to enable or disable the visibility of app content in app switcher mode.
This commit is contained in:
@@ -32,8 +32,8 @@ class EnteApp extends StatefulWidget {
|
||||
this.killBackgroundTask,
|
||||
this.locale,
|
||||
this.savedThemeMode, {
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
super.key,
|
||||
});
|
||||
|
||||
static void setLocale(BuildContext context, Locale newLocale) {
|
||||
final state = context.findAncestorStateOfType<_EnteAppState>()!;
|
||||
|
||||
5
mobile/lib/generated/intl/messages_cs.dart
generated
5
mobile/lib/generated/intl/messages_cs.dart
generated
@@ -60,6 +60,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
MessageLookupByLibrary.simpleMessage("Face recognition"),
|
||||
"fileTypes": MessageLookupByLibrary.simpleMessage("File types"),
|
||||
"foundFaces": MessageLookupByLibrary.simpleMessage("Found faces"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"immediately": MessageLookupByLibrary.simpleMessage("Immediately"),
|
||||
"indexingIsPaused": MessageLookupByLibrary.simpleMessage(
|
||||
"Indexing is paused, will automatically resume when device is ready"),
|
||||
|
||||
8
mobile/lib/generated/intl/messages_de.dart
generated
8
mobile/lib/generated/intl/messages_de.dart
generated
@@ -831,6 +831,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("Hilfe"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Versteckt"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Ausblenden"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Verstecken..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Gehostet bei OSM France"),
|
||||
@@ -1082,6 +1087,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"pairWithPin":
|
||||
MessageLookupByLibrary.simpleMessage("Mit PIN verbinden"),
|
||||
"pairingComplete": MessageLookupByLibrary.simpleMessage("Verbunden"),
|
||||
"panorama": MessageLookupByLibrary.simpleMessage("Panorama"),
|
||||
"passKeyPendingVerification": MessageLookupByLibrary.simpleMessage(
|
||||
"Verifizierung steht noch aus"),
|
||||
"passkey": MessageLookupByLibrary.simpleMessage("Passkey"),
|
||||
@@ -1643,6 +1649,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"verifying": MessageLookupByLibrary.simpleMessage("Verifiziere …"),
|
||||
"verifyingRecoveryKey": MessageLookupByLibrary.simpleMessage(
|
||||
"Wiederherstellungs-Schlüssel wird überprüft..."),
|
||||
"videoInfo":
|
||||
MessageLookupByLibrary.simpleMessage("Video-Informationen"),
|
||||
"videoSmallCase": MessageLookupByLibrary.simpleMessage("Video"),
|
||||
"videos": MessageLookupByLibrary.simpleMessage("Videos"),
|
||||
"viewActiveSessions":
|
||||
|
||||
5
mobile/lib/generated/intl/messages_en.dart
generated
5
mobile/lib/generated/intl/messages_en.dart
generated
@@ -800,6 +800,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("Help"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Hidden"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Hide"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Hiding..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Hosted at OSM France"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_es.dart
generated
5
mobile/lib/generated/intl/messages_es.dart
generated
@@ -834,6 +834,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("Ayuda"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Oculto"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Ocultar"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Ocultando..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Alojado en OSM France"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_fr.dart
generated
5
mobile/lib/generated/intl/messages_fr.dart
generated
@@ -781,6 +781,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Comment avez-vous entendu parler de Ente? (facultatif)"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Masqué"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Masquer"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Masquage en cours..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Hébergé chez OSM France"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_it.dart
generated
5
mobile/lib/generated/intl/messages_it.dart
generated
@@ -751,6 +751,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Come hai sentito parlare di Ente? (opzionale)"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Nascosti"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Nascondi"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Nascondendo..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Ospitato presso OSM France"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_ko.dart
generated
5
mobile/lib/generated/intl/messages_ko.dart
generated
@@ -60,6 +60,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
MessageLookupByLibrary.simpleMessage("Face recognition"),
|
||||
"fileTypes": MessageLookupByLibrary.simpleMessage("File types"),
|
||||
"foundFaces": MessageLookupByLibrary.simpleMessage("Found faces"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"immediately": MessageLookupByLibrary.simpleMessage("Immediately"),
|
||||
"indexingIsPaused": MessageLookupByLibrary.simpleMessage(
|
||||
"Indexing is paused, will automatically resume when device is ready"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_nl.dart
generated
5
mobile/lib/generated/intl/messages_nl.dart
generated
@@ -834,6 +834,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("Hulp"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Verborgen"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Verbergen"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Verbergen..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Gehost bij OSM France"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_no.dart
generated
5
mobile/lib/generated/intl/messages_no.dart
generated
@@ -78,6 +78,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"feedback": MessageLookupByLibrary.simpleMessage("Tilbakemelding"),
|
||||
"fileTypes": MessageLookupByLibrary.simpleMessage("File types"),
|
||||
"foundFaces": MessageLookupByLibrary.simpleMessage("Found faces"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"immediately": MessageLookupByLibrary.simpleMessage("Immediately"),
|
||||
"indexingIsPaused": MessageLookupByLibrary.simpleMessage(
|
||||
"Indexing is paused, will automatically resume when device is ready"),
|
||||
|
||||
38
mobile/lib/generated/intl/messages_pl.dart
generated
38
mobile/lib/generated/intl/messages_pl.dart
generated
@@ -89,7 +89,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
static String m22(newEmail) => "Adres e-mail został zmieniony na ${newEmail}";
|
||||
|
||||
static String m23(email) =>
|
||||
"${email} nie posiada konta Ente.\n\nWyślij mu zaproszenie do udostępniania zdjęć.";
|
||||
"${email} nie posiada konta Ente.\n\nWyślij im zaproszenie do udostępniania zdjęć.";
|
||||
|
||||
static String m24(count, formattedNumber) =>
|
||||
"${Intl.plural(count, one: '1 plikowi', other: '${formattedNumber} plikom')} na tym urządzeniu została bezpiecznie utworzona kopia zapasowa";
|
||||
@@ -306,7 +306,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"androidGoToSettingsDescription": MessageLookupByLibrary.simpleMessage(
|
||||
"Uwierzytelnianie biometryczne nie jest skonfigurowane na tym urządzeniu. Przejdź do \'Ustawienia > Bezpieczeństwo\', aby dodać uwierzytelnianie biometryczne."),
|
||||
"androidIosWebDesktop": MessageLookupByLibrary.simpleMessage(
|
||||
"Android, iOS, Strona Internetowa, Komputer"),
|
||||
"Android, iOS, Strona Internetowa, Aplikacja Komputerowa"),
|
||||
"androidSignInTitle":
|
||||
MessageLookupByLibrary.simpleMessage("Wymagane uwierzytelnienie"),
|
||||
"appLock": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -355,7 +355,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Proszę uwierzytelnić się, aby zmienić hasło"),
|
||||
"authToConfigureTwofactorAuthentication":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Uwierzytelnij się, aby skonfigurować uwierzytelnianie dwuskładnikowe"),
|
||||
"Uwierzytelnij się, aby skonfigurować uwierzytelnianie dwustopniowe"),
|
||||
"authToInitiateAccountDeletion": MessageLookupByLibrary.simpleMessage(
|
||||
"Proszę uwierzytelnić się, aby zainicjować usuwanie konta"),
|
||||
"authToViewYourActiveSessions": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -488,7 +488,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"color": MessageLookupByLibrary.simpleMessage("Kolor"),
|
||||
"confirm": MessageLookupByLibrary.simpleMessage("Potwierdź"),
|
||||
"confirm2FADisable": MessageLookupByLibrary.simpleMessage(
|
||||
"Czy na pewno chcesz wyłączyć uwierzytelnianie dwuetapowe?"),
|
||||
"Czy na pewno chcesz wyłączyć uwierzytelnianie dwustopniowe?"),
|
||||
"confirmAccountDeletion":
|
||||
MessageLookupByLibrary.simpleMessage("Potwierdź usunięcie konta"),
|
||||
"confirmDeletePrompt": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -620,7 +620,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Wyłącz blokadę ekranu urządzenia, gdy Ente jest na pierwszym planie i w trakcie tworzenia kopii zapasowej. Zwykle nie jest to potrzebne, ale może pomóc w szybszym przesyłaniu i początkowym imporcie dużych bibliotek."),
|
||||
"deviceNotFound":
|
||||
MessageLookupByLibrary.simpleMessage("Nie znaleziono urządzenia"),
|
||||
"didYouKnow": MessageLookupByLibrary.simpleMessage("Czy wiedziałeś?"),
|
||||
"didYouKnow":
|
||||
MessageLookupByLibrary.simpleMessage("Czy wiedziałeś/aś?"),
|
||||
"disableAutoLock":
|
||||
MessageLookupByLibrary.simpleMessage("Wyłącz automatyczną blokadę"),
|
||||
"disableDownloadWarningBody": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -629,10 +630,10 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
MessageLookupByLibrary.simpleMessage("Uwaga"),
|
||||
"disableLinkMessage": m18,
|
||||
"disableTwofactor": MessageLookupByLibrary.simpleMessage(
|
||||
"Wyłącz Uwierzytelnianie Dwuetapowe"),
|
||||
"Wyłącz uwierzytelnianie dwustopniowe"),
|
||||
"disablingTwofactorAuthentication":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Uwierzytelnianie dwuskładnikowe jest wyłączane..."),
|
||||
"Uwierzytelnianie dwustopniowe jest wyłączane..."),
|
||||
"discord": MessageLookupByLibrary.simpleMessage("Discord"),
|
||||
"dismiss": MessageLookupByLibrary.simpleMessage("Odrzuć"),
|
||||
"distanceInKMUnit": MessageLookupByLibrary.simpleMessage("km"),
|
||||
@@ -823,6 +824,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("Pomoc"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Ukryte"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Ukryj"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Ukrywanie..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Hostowane w OSM Francja"),
|
||||
@@ -1054,8 +1060,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"notifications": MessageLookupByLibrary.simpleMessage("Powiadomienia"),
|
||||
"ok": MessageLookupByLibrary.simpleMessage("Ok"),
|
||||
"onDevice": MessageLookupByLibrary.simpleMessage("Na urządzeniu"),
|
||||
"onEnte": MessageLookupByLibrary.simpleMessage(
|
||||
"Na <branding>ente</branding>"),
|
||||
"onEnte":
|
||||
MessageLookupByLibrary.simpleMessage("W <branding>ente</branding>"),
|
||||
"oops": MessageLookupByLibrary.simpleMessage("Ups"),
|
||||
"oopsCouldNotSaveEdits": MessageLookupByLibrary.simpleMessage(
|
||||
"Ups, nie udało się zapisać zmian"),
|
||||
@@ -1075,6 +1081,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
MessageLookupByLibrary.simpleMessage("Sparuj z kodem PIN"),
|
||||
"pairingComplete":
|
||||
MessageLookupByLibrary.simpleMessage("Parowanie zakończone"),
|
||||
"panorama": MessageLookupByLibrary.simpleMessage("Panorama"),
|
||||
"passKeyPendingVerification": MessageLookupByLibrary.simpleMessage(
|
||||
"Weryfikacja jest nadal w toku"),
|
||||
"passkey": MessageLookupByLibrary.simpleMessage("Klucz dostępu"),
|
||||
@@ -1564,19 +1571,19 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"twitter": MessageLookupByLibrary.simpleMessage("Twitter"),
|
||||
"twoMonthsFreeOnYearlyPlans": MessageLookupByLibrary.simpleMessage(
|
||||
"2 miesiące za darmo w planach rocznych"),
|
||||
"twofactor":
|
||||
MessageLookupByLibrary.simpleMessage("Uwierzytelnianie dwuetapowe"),
|
||||
"twofactor": MessageLookupByLibrary.simpleMessage(
|
||||
"Uwierzytelnianie dwustopniowe"),
|
||||
"twofactorAuthenticationHasBeenDisabled":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Uwierzytelnianie dwuskładnikowe zostało wyłączone"),
|
||||
"Uwierzytelnianie dwustopniowe zostało wyłączone"),
|
||||
"twofactorAuthenticationPageTitle":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Uwierzytelnianie dwuskładnikowe"),
|
||||
"Uwierzytelnianie dwustopniowe"),
|
||||
"twofactorAuthenticationSuccessfullyReset":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Pomyślnie zresetowano uwierzytelnianie dwuskładnikowe"),
|
||||
"Pomyślnie zresetowano uwierzytelnianie dwustopniowe"),
|
||||
"twofactorSetup": MessageLookupByLibrary.simpleMessage(
|
||||
"Uwierzytelnianie dwuskładnikowe"),
|
||||
"Uwierzytelnianie dwustopniowe"),
|
||||
"unarchive":
|
||||
MessageLookupByLibrary.simpleMessage("Przywróć z archiwum"),
|
||||
"unarchiveAlbum":
|
||||
@@ -1632,6 +1639,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"verifying": MessageLookupByLibrary.simpleMessage("Weryfikowanie..."),
|
||||
"verifyingRecoveryKey": MessageLookupByLibrary.simpleMessage(
|
||||
"Weryfikowanie klucza odzyskiwania..."),
|
||||
"videoInfo": MessageLookupByLibrary.simpleMessage("Informacje Wideo"),
|
||||
"videoSmallCase": MessageLookupByLibrary.simpleMessage("wideo"),
|
||||
"videos": MessageLookupByLibrary.simpleMessage("Wideo"),
|
||||
"viewActiveSessions":
|
||||
|
||||
5
mobile/lib/generated/intl/messages_pt.dart
generated
5
mobile/lib/generated/intl/messages_pt.dart
generated
@@ -824,6 +824,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("Ajuda"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Oculto"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Ocultar"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Ocultando..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Hospedado na OSM France"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_ru.dart
generated
5
mobile/lib/generated/intl/messages_ru.dart
generated
@@ -818,6 +818,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("помощь"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Скрыто"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Скрыть"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Скрытие..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("Размещено на OSM France"),
|
||||
|
||||
5
mobile/lib/generated/intl/messages_tr.dart
generated
5
mobile/lib/generated/intl/messages_tr.dart
generated
@@ -820,6 +820,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("Yardım"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("Gizle"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Gizle"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("Gizleniyor..."),
|
||||
"hostedAtOsmFrance":
|
||||
MessageLookupByLibrary.simpleMessage("OSM Fransa\'da ağırlandı"),
|
||||
|
||||
7
mobile/lib/generated/intl/messages_zh.dart
generated
7
mobile/lib/generated/intl/messages_zh.dart
generated
@@ -676,6 +676,11 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"help": MessageLookupByLibrary.simpleMessage("帮助"),
|
||||
"hidden": MessageLookupByLibrary.simpleMessage("已隐藏"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("隐藏"),
|
||||
"hideContent": MessageLookupByLibrary.simpleMessage("Hide content"),
|
||||
"hideContentDescriptionAndroid": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher and disables screenshots"),
|
||||
"hideContentDescriptionIos": MessageLookupByLibrary.simpleMessage(
|
||||
"Hides app content in the app switcher"),
|
||||
"hiding": MessageLookupByLibrary.simpleMessage("正在隐藏..."),
|
||||
"hostedAtOsmFrance": MessageLookupByLibrary.simpleMessage("法国 OSM 主办"),
|
||||
"howItWorks": MessageLookupByLibrary.simpleMessage("工作原理"),
|
||||
@@ -883,6 +888,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"pair": MessageLookupByLibrary.simpleMessage("配对"),
|
||||
"pairWithPin": MessageLookupByLibrary.simpleMessage("用 PIN 配对"),
|
||||
"pairingComplete": MessageLookupByLibrary.simpleMessage("配对完成"),
|
||||
"panorama": MessageLookupByLibrary.simpleMessage("全景"),
|
||||
"passKeyPendingVerification":
|
||||
MessageLookupByLibrary.simpleMessage("仍需进行验证"),
|
||||
"passkey": MessageLookupByLibrary.simpleMessage("通行密钥"),
|
||||
@@ -1315,6 +1321,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"verifying": MessageLookupByLibrary.simpleMessage("正在验证..."),
|
||||
"verifyingRecoveryKey":
|
||||
MessageLookupByLibrary.simpleMessage("正在验证恢复密钥..."),
|
||||
"videoInfo": MessageLookupByLibrary.simpleMessage("视频详情"),
|
||||
"videoSmallCase": MessageLookupByLibrary.simpleMessage("视频"),
|
||||
"videos": MessageLookupByLibrary.simpleMessage("视频"),
|
||||
"viewActiveSessions": MessageLookupByLibrary.simpleMessage("查看活动会话"),
|
||||
|
||||
50
mobile/lib/generated/l10n.dart
generated
50
mobile/lib/generated/l10n.dart
generated
@@ -9125,16 +9125,6 @@ class S {
|
||||
);
|
||||
}
|
||||
|
||||
/// `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(
|
||||
@@ -9145,6 +9135,16 @@ class S {
|
||||
);
|
||||
}
|
||||
|
||||
/// `Auto lock`
|
||||
String get autoLock {
|
||||
return Intl.message(
|
||||
'Auto lock',
|
||||
name: 'autoLock',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Immediately`
|
||||
String get immediately {
|
||||
return Intl.message(
|
||||
@@ -9164,6 +9164,36 @@ class S {
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Hide content`
|
||||
String get hideContent {
|
||||
return Intl.message(
|
||||
'Hide content',
|
||||
name: 'hideContent',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Hides app content in the app switcher and disables screenshots`
|
||||
String get hideContentDescriptionAndroid {
|
||||
return Intl.message(
|
||||
'Hides app content in the app switcher and disables screenshots',
|
||||
name: 'hideContentDescriptionAndroid',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Hides app content in the app switcher`
|
||||
String get hideContentDescriptionIos {
|
||||
return Intl.message(
|
||||
'Hides app content in the app switcher',
|
||||
name: 'hideContentDescriptionIos',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
||||
@@ -44,5 +44,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1282,5 +1282,8 @@
|
||||
"autoLock": "Auto lock",
|
||||
"immediately": "Immediately",
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"videoInfo": "Video-Informationen"
|
||||
"videoInfo": "Video-Informationen",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1282,5 +1282,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1268,5 +1268,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1185,5 +1185,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1147,5 +1147,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -44,5 +44,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1280,5 +1280,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -58,5 +58,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1282,5 +1282,8 @@
|
||||
"autoLock": "Auto lock",
|
||||
"immediately": "Immediately",
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"videoInfo": "Informacje Wideo"
|
||||
"videoInfo": "Informacje Wideo",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1280,5 +1280,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1267,5 +1267,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1279,5 +1279,8 @@
|
||||
"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"
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1282,5 +1282,8 @@
|
||||
"autoLock": "Auto lock",
|
||||
"immediately": "Immediately",
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"videoInfo": "视频详情"
|
||||
"videoInfo": "视频详情",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptionIos": "Hides app content in the app switcher"
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import "dart:io";
|
||||
|
||||
import "package:flutter/material.dart";
|
||||
import "package:photos/core/configuration.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
@@ -29,9 +31,12 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
bool isPinEnabled = false;
|
||||
bool isPasswordEnabled = false;
|
||||
late int autoLockTimeInMilliseconds;
|
||||
late bool hideAppContent;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
hideAppContent = _lockscreenSetting.getShouldHideAppContent();
|
||||
autoLockTimeInMilliseconds = _lockscreenSetting.getAutoLockTime();
|
||||
_initializeSettings();
|
||||
appLock = isPinEnabled ||
|
||||
@@ -42,9 +47,12 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
Future<void> _initializeSettings() async {
|
||||
final bool passwordEnabled = await _lockscreenSetting.isPasswordSet();
|
||||
final bool pinEnabled = await _lockscreenSetting.isPinSet();
|
||||
final bool shouldShowAppContent =
|
||||
_lockscreenSetting.getShouldHideAppContent();
|
||||
setState(() {
|
||||
isPasswordEnabled = passwordEnabled;
|
||||
isPinEnabled = pinEnabled;
|
||||
hideAppContent = shouldShowAppContent;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -104,12 +112,24 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
AppLock.of(context)!.setEnabled(!appLock);
|
||||
await _configuration.setSystemLockScreen(!appLock);
|
||||
await _lockscreenSetting.removePinAndPassword();
|
||||
if (appLock == true) {
|
||||
await _lockscreenSetting.setHideAppContent(false);
|
||||
}
|
||||
setState(() {
|
||||
_initializeSettings();
|
||||
appLock = !appLock;
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _tapHideContent() async {
|
||||
setState(() {
|
||||
hideAppContent = !hideAppContent;
|
||||
});
|
||||
await _lockscreenSetting.setHideAppContent(
|
||||
hideAppContent,
|
||||
);
|
||||
}
|
||||
|
||||
String _formatTime(Duration duration) {
|
||||
if (duration.inHours != 0) {
|
||||
return "in ${duration.inHours} hour${duration.inHours > 1 ? 's' : ''}";
|
||||
@@ -264,6 +284,40 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
MenuItemWidget(
|
||||
captionedTextWidget: CaptionedTextWidget(
|
||||
title: S.of(context).hideContent,
|
||||
),
|
||||
alignCaptionedTextToLeft: true,
|
||||
singleBorderRadius: 8,
|
||||
menuItemColor: colorTheme.fillFaint,
|
||||
trailingWidget: ToggleSwitchWidget(
|
||||
value: () => hideAppContent,
|
||||
onChanged: () => _tapHideContent(),
|
||||
),
|
||||
trailingIconColor: colorTheme.tabIcon,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 14,
|
||||
left: 14,
|
||||
right: 12,
|
||||
),
|
||||
child: Text(
|
||||
Platform.isAndroid
|
||||
? S
|
||||
.of(context)
|
||||
.hideContentDescriptionAndroid
|
||||
: S
|
||||
.of(context)
|
||||
.hideContentDescriptionIos,
|
||||
style: textTheme.miniFaint,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Container(),
|
||||
|
||||
@@ -4,6 +4,7 @@ import "package:flutter/foundation.dart";
|
||||
import "package:flutter_secure_storage/flutter_secure_storage.dart";
|
||||
import "package:flutter_sodium/flutter_sodium.dart";
|
||||
import "package:photos/utils/crypto_util.dart";
|
||||
import "package:privacy_screen/privacy_screen.dart";
|
||||
import "package:shared_preferences/shared_preferences.dart";
|
||||
|
||||
class LockScreenSettings {
|
||||
@@ -16,8 +17,8 @@ class LockScreenSettings {
|
||||
static const saltKey = "ls_salt";
|
||||
static const keyInvalidAttempts = "ls_invalid_attempts";
|
||||
static const lastInvalidAttemptTime = "ls_last_invalid_attempt_time";
|
||||
static const keyHideAppContent = "ls_hide_app_content";
|
||||
static const autoLockTime = "ls_auto_lock_time";
|
||||
|
||||
late FlutterSecureStorage _secureStorage;
|
||||
late SharedPreferences _preferences;
|
||||
static const List<Duration> autoLockDurations = [
|
||||
@@ -31,6 +32,29 @@ class LockScreenSettings {
|
||||
void init(SharedPreferences prefs) async {
|
||||
_secureStorage = const FlutterSecureStorage();
|
||||
_preferences = prefs;
|
||||
|
||||
///Workaround for privacyScreen not working when app is killed and opened.
|
||||
await setHideAppContent(getShouldHideAppContent());
|
||||
}
|
||||
|
||||
Future<void> setHideAppContent(bool hideContent) async {
|
||||
!hideContent
|
||||
? await PrivacyScreen.instance.disable()
|
||||
: await PrivacyScreen.instance.enable(
|
||||
iosOptions: const PrivacyIosOptions(
|
||||
enablePrivacy: true,
|
||||
lockTrigger: IosLockTrigger.didEnterBackground,
|
||||
),
|
||||
androidOptions: const PrivacyAndroidOptions(
|
||||
enableSecure: true,
|
||||
),
|
||||
blurEffect: PrivacyBlurEffect.extraLight,
|
||||
);
|
||||
await _preferences.setBool(keyHideAppContent, hideContent);
|
||||
}
|
||||
|
||||
bool getShouldHideAppContent() {
|
||||
return _preferences.getBool(keyHideAppContent) ?? false;
|
||||
}
|
||||
|
||||
Future<void> setAutoLockTime(Duration duration) async {
|
||||
|
||||
@@ -1903,6 +1903,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
privacy_screen:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: privacy_screen
|
||||
sha256: b80297d2726d96e8a8341149e81a415302755f02d3af7c05c820d9e191bbfbee
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.0.6"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -142,6 +142,7 @@ dependencies:
|
||||
pinput: ^5.0.0
|
||||
pointycastle: ^3.7.3
|
||||
pool: ^1.5.1
|
||||
privacy_screen: ^0.0.6
|
||||
protobuf: ^3.1.0
|
||||
provider: ^6.0.0
|
||||
quiver: ^3.0.1
|
||||
|
||||
Reference in New Issue
Block a user