Fix lockscreen bug
This commit is contained in:
parent
196c987011
commit
cbeb2eb3cd
14 changed files with 39 additions and 17 deletions
2
lib/generated/intl/messages_cs.dart
generated
2
lib/generated/intl/messages_cs.dart
generated
|
@ -24,6 +24,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||
"addToHiddenAlbum":
|
||||
MessageLookupByLibrary.simpleMessage("Add to hidden album"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"moveToHiddenAlbum":
|
||||
MessageLookupByLibrary.simpleMessage("Move to hidden album")
|
||||
};
|
||||
|
|
2
lib/generated/intl/messages_de.dart
generated
2
lib/generated/intl/messages_de.dart
generated
|
@ -503,6 +503,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbumsDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"Damit werden alle leeren Alben gelöscht. Dies ist nützlich, wenn du das Durcheinander in deiner Albenliste verringern möchtest."),
|
||||
"deleteAll": MessageLookupByLibrary.simpleMessage("Alle löschen"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Bitte sende eine E-Mail an <warning>account-deletion@ente.io</warning> von Deiner bei uns hinterlegten E-Mail-Adresse."),
|
||||
"deleteEmptyAlbums":
|
||||
|
|
2
lib/generated/intl/messages_en.dart
generated
2
lib/generated/intl/messages_en.dart
generated
|
@ -486,6 +486,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbumsDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This will delete all empty albums. This is useful when you want to reduce the clutter in your album list."),
|
||||
"deleteAll": MessageLookupByLibrary.simpleMessage("Delete All"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Please send an email to <warning>account-deletion@ente.io</warning> from your registered email address."),
|
||||
"deleteEmptyAlbums":
|
||||
|
|
2
lib/generated/intl/messages_es.dart
generated
2
lib/generated/intl/messages_es.dart
generated
|
@ -451,6 +451,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbumsDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"Esto eliminará todos los álbunes vacíos. Esto es útil cuando quieres reducir el desorden en tu lista de álbumes."),
|
||||
"deleteAll": MessageLookupByLibrary.simpleMessage("Borrar Todo"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Por favor, envíe un correo electrónico a <warning>account-deletion@ente.io</warning> desde su dirección de correo electrónico registrada."),
|
||||
"deleteEmptyAlbums":
|
||||
|
|
2
lib/generated/intl/messages_fr.dart
generated
2
lib/generated/intl/messages_fr.dart
generated
|
@ -509,6 +509,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbumsDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"Ceci supprimera tous les albums vides. Ceci est utile lorsque vous voulez réduire l\'encombrement dans votre liste d\'albums."),
|
||||
"deleteAll": MessageLookupByLibrary.simpleMessage("Tout Supprimer"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Veuillez envoyer un e-mail à <warning>account-deletion@ente.io</warning> à partir de votre adresse e-mail enregistrée."),
|
||||
"deleteEmptyAlbums":
|
||||
|
|
2
lib/generated/intl/messages_it.dart
generated
2
lib/generated/intl/messages_it.dart
generated
|
@ -501,6 +501,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbumsDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"Questo eliminerà tutti gli album vuoti. È utile quando si desidera ridurre l\'ingombro nella lista degli album."),
|
||||
"deleteAll": MessageLookupByLibrary.simpleMessage("Elimina tutto"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"Questo account è collegato ad altre app di ente, se ne utilizzi.\\n\\nI tuoi dati caricati, su tutte le app di ente, saranno pianificati per la cancellazione e il tuo account verrà eliminato definitivamente."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Invia un\'email a <warning>account-deletion@ente.io</warning> dal tuo indirizzo email registrato."),
|
||||
"deleteEmptyAlbums":
|
||||
|
|
2
lib/generated/intl/messages_ko.dart
generated
2
lib/generated/intl/messages_ko.dart
generated
|
@ -24,6 +24,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
|
||||
"addToHiddenAlbum":
|
||||
MessageLookupByLibrary.simpleMessage("Add to hidden album"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"moveToHiddenAlbum":
|
||||
MessageLookupByLibrary.simpleMessage("Move to hidden album")
|
||||
};
|
||||
|
|
2
lib/generated/intl/messages_nl.dart
generated
2
lib/generated/intl/messages_nl.dart
generated
|
@ -501,6 +501,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbumsDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"Hiermee worden alle lege albums verwijderd. Dit is handig wanneer je rommel in je albumlijst wilt verminderen."),
|
||||
"deleteAll": MessageLookupByLibrary.simpleMessage("Alles Verwijderen"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"Dit account is gekoppeld aan andere ente apps, als je er gebruik van maakt.\\n\\nJe geüploade gegevens worden in alle ente apps gepland voor verwijdering, en je account wordt permanent verwijderd voor alle ente diensten."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Stuur een e-mail naar <warning>account-deletion@ente.io</warning> vanaf het door jou geregistreerde e-mailadres."),
|
||||
"deleteEmptyAlbums":
|
||||
|
|
2
lib/generated/intl/messages_no.dart
generated
2
lib/generated/intl/messages_no.dart
generated
|
@ -36,6 +36,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAccount": MessageLookupByLibrary.simpleMessage("Slett konto"),
|
||||
"deleteAccountFeedbackPrompt": MessageLookupByLibrary.simpleMessage(
|
||||
"Vi er lei oss for at du forlater oss. Gi oss gjerne en tilbakemelding så vi kan forbedre oss."),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"email": MessageLookupByLibrary.simpleMessage("E-post"),
|
||||
"enterValidEmail": MessageLookupByLibrary.simpleMessage(
|
||||
"Vennligst skriv inn en gyldig e-postadresse."),
|
||||
|
|
2
lib/generated/intl/messages_pl.dart
generated
2
lib/generated/intl/messages_pl.dart
generated
|
@ -61,6 +61,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"Przykro nam, że odchodzisz. Wyjaśnij nam, dlaczego nas opuszczasz, aby pomóc ulepszać nasze usługi."),
|
||||
"deleteAccountPermanentlyButton":
|
||||
MessageLookupByLibrary.simpleMessage("Usuń konto na stałe"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Wyślij wiadomość e-mail na <warning>account-deletion@ente.io</warning> z zarejestrowanego adresu e-mail."),
|
||||
"deleteReason1": MessageLookupByLibrary.simpleMessage(
|
||||
|
|
2
lib/generated/intl/messages_pt.dart
generated
2
lib/generated/intl/messages_pt.dart
generated
|
@ -157,6 +157,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbum": MessageLookupByLibrary.simpleMessage("Excluir álbum"),
|
||||
"deleteAlbumDialog": MessageLookupByLibrary.simpleMessage(
|
||||
"Também excluir as fotos (e vídeos) presentes neste álbum de <bold>todos os</bold> outros álbuns dos quais eles fazem parte?"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted."),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"Por favor, envie um e-mail para <warning>account-deletion@ente.io</warning> a partir do seu endereço de e-mail registrado."),
|
||||
"deletePhotos": MessageLookupByLibrary.simpleMessage("Excluir fotos"),
|
||||
|
|
2
lib/generated/intl/messages_zh.dart
generated
2
lib/generated/intl/messages_zh.dart
generated
|
@ -415,6 +415,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"deleteAlbumsDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"这将删除所有空相册。 当您想减少相册列表中的混乱时,这很有用。"),
|
||||
"deleteAll": MessageLookupByLibrary.simpleMessage("全部删除"),
|
||||
"deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage(
|
||||
"此账户已链接到其他 ente 旗下的应用程序(如果您使用任何 ente 旗下的应用程序)。\\n\\n您在所有 ente 旗下的应用程序中上传的数据将被安排删除,并且您的账户将被永久删除。"),
|
||||
"deleteEmailRequest": MessageLookupByLibrary.simpleMessage(
|
||||
"请从您注册的电子邮件地址发送电子邮件到 <warning>account-delettion@ente.io</warning>。"),
|
||||
"deleteEmptyAlbums": MessageLookupByLibrary.simpleMessage("删除空相册"),
|
||||
|
|
21
lib/generated/l10n.dart
generated
21
lib/generated/l10n.dart
generated
|
@ -190,17 +190,6 @@ class S {
|
|||
);
|
||||
}
|
||||
|
||||
/// `This account is linked to other ente apps, if you use any.`
|
||||
/// `Your uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.`
|
||||
String get deleteConfirmDialogBody {
|
||||
return Intl.message(
|
||||
'This account is linked to other ente apps, if you use any.\n\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.',
|
||||
name: 'deleteConfirmDialogBody',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Delete Account Permanently`
|
||||
String get deleteAccountPermanentlyButton {
|
||||
return Intl.message(
|
||||
|
@ -7715,6 +7704,16 @@ class S {
|
|||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `This account is linked to other ente apps, if you use any.\n\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.`
|
||||
String get deleteConfirmDialogBody {
|
||||
return Intl.message(
|
||||
'This account is linked to other ente apps, if you use any.\\n\\nYour uploaded data, across all ente apps, will be scheduled for deletion, and your account will be permanently deleted.',
|
||||
name: 'deleteConfirmDialogBody',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
|
|
@ -23,10 +23,8 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
|
|||
void initState() {
|
||||
_logger.info("initState");
|
||||
super.initState();
|
||||
_showLockScreen(source: "initState");
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
||||
_showLockScreen(source: "initState");
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -65,7 +63,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
|
|||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||
_logger.info(state.toString());
|
||||
if (state == AppLifecycleState.resumed) {
|
||||
if (state == AppLifecycleState.resumed && !_isShowingLockScreen) {
|
||||
// This is triggered either when the lock screen is dismissed or when
|
||||
// the app is brought to foreground
|
||||
_hasPlacedAppInBackground = false;
|
||||
|
@ -97,19 +95,20 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
|
|||
}
|
||||
|
||||
Future<void> _showLockScreen({String source = ''}) async {
|
||||
_logger.info("Showing lock screen $source");
|
||||
final int id = DateTime.now().millisecondsSinceEpoch;
|
||||
_logger.info("Showing lock screen $source $id");
|
||||
try {
|
||||
_isShowingLockScreen = true;
|
||||
final result = await requestAuthentication(
|
||||
context,
|
||||
S.of(context).authToViewYourMemories,
|
||||
);
|
||||
_logger.finest("LockScreen Result $result $id");
|
||||
_isShowingLockScreen = false;
|
||||
if (result) {
|
||||
lastAuthenticatingTime = DateTime.now().millisecondsSinceEpoch;
|
||||
AppLock.of(context)!.didUnlock();
|
||||
} else {
|
||||
_logger.info("Dismissed");
|
||||
if (!_hasPlacedAppInBackground) {
|
||||
// Treat this as a failure only if user did not explicitly
|
||||
// put the app in background
|
||||
|
|
Loading…
Add table
Reference in a new issue