From 1b372685774d3232e79bb792a58502650c67bf41 Mon Sep 17 00:00:00 2001 From: otsmr Date: Thu, 16 Jul 2026 10:31:41 +0200 Subject: [PATCH] clear unused strings --- .../generated/app_localizations.dart | 116 +----------------- .../generated/app_localizations_de.dart | 73 +---------- .../generated/app_localizations_en.dart | 72 +---------- lib/src/localization/translations | 2 +- .../import_from_gallery.view.dart | 10 +- 5 files changed, 12 insertions(+), 261 deletions(-) diff --git a/lib/src/localization/generated/app_localizations.dart b/lib/src/localization/generated/app_localizations.dart index 10999072..c384fff3 100644 --- a/lib/src/localization/generated/app_localizations.dart +++ b/lib/src/localization/generated/app_localizations.dart @@ -926,12 +926,6 @@ abstract class AppLocalizations { /// **'Verified via link.'** String get verificationTypeLink; - /// No description provided for @verificationTypeContactSharedByVerified. - /// - /// In en, this message translates to: - /// **'Contact received from a verified contact.'** - String get verificationTypeContactSharedByVerified; - /// No description provided for @verificationTypeMigratedFromOldVersion. /// /// In en, this message translates to: @@ -1670,12 +1664,6 @@ abstract class AppLocalizations { /// **'Retransmission requested'** String get retransmissionRequested; - /// No description provided for @openChangeLog. - /// - /// In en, this message translates to: - /// **'Open changelog automatically'** - String get openChangeLog; - /// No description provided for @reportUserTitle. /// /// In en, this message translates to: @@ -2084,12 +2072,6 @@ abstract class AppLocalizations { /// **'wants to connect with you.'** String get notificationContactRequest; - /// No description provided for @notificationContactRequestUnknownUser. - /// - /// In en, this message translates to: - /// **'have received a new contact request.'** - String get notificationContactRequestUnknownUser; - /// No description provided for @notificationAcceptRequest. /// /// In en, this message translates to: @@ -2144,18 +2126,6 @@ abstract class AppLocalizations { /// **'has responded{inGroup}.'** String notificationResponse(Object inGroup); - /// No description provided for @notificationTitleUnknown. - /// - /// In en, this message translates to: - /// **'You have a new message.'** - String get notificationTitleUnknown; - - /// No description provided for @notificationBodyUnknown. - /// - /// In en, this message translates to: - /// **'Open twonly to learn more.'** - String get notificationBodyUnknown; - /// No description provided for @notificationCategoryMessageTitle. /// /// In en, this message translates to: @@ -2438,12 +2408,6 @@ abstract class AppLocalizations { /// **'Back up your twonly identity, as this is the only way to restore your account if you uninstall the app or lose your phone.'** String get onboardingBackupBody; - /// No description provided for @onboardingVerificationBadgeTitle. - /// - /// In en, this message translates to: - /// **'Verification Badge'** - String get onboardingVerificationBadgeTitle; - /// No description provided for @onboardingUserDiscoveryShareFriends. /// /// In en, this message translates to: @@ -3434,18 +3398,6 @@ abstract class AppLocalizations { /// **'Step-by-step setup so you can decide for yourself.'** String get onboardingProfileSelectionCustomizeDesc; - /// No description provided for @onboardingProfileSelectionStrictTitle. - /// - /// In en, this message translates to: - /// **'Enhanced Protection'** - String get onboardingProfileSelectionStrictTitle; - - /// No description provided for @onboardingProfileSelectionStrictDesc. - /// - /// In en, this message translates to: - /// **'Maximum anti-phishing defense. Recommended for *journalists & public figures*.'** - String get onboardingProfileSelectionStrictDesc; - /// No description provided for @replyFlameRestored. /// /// In en, this message translates to: @@ -3458,24 +3410,6 @@ abstract class AppLocalizations { /// **'Ask a friend'** String get replyAskAFriend; - /// No description provided for @unverifiedWarningDirectTitle. - /// - /// In en, this message translates to: - /// **'Identity not verified in person'** - String get unverifiedWarningDirectTitle; - - /// No description provided for @unverifiedWarningGroupTitle. - /// - /// In en, this message translates to: - /// **'Not all members are verified in person'** - String get unverifiedWarningGroupTitle; - - /// No description provided for @unverifiedWarningBody. - /// - /// In en, this message translates to: - /// **'*Avoid sharing sensitive data*. Risk of *impersonation* without manual verification.'** - String get unverifiedWarningBody; - /// No description provided for @unverifiedWarningButton. /// /// In en, this message translates to: @@ -3563,12 +3497,8 @@ abstract class AppLocalizations { /// No description provided for @importGalleryComplete. /// /// In en, this message translates to: - /// **'Import complete: {imported} successfully imported, {duplicated} duplicated and {failed} failed.'** - String importGalleryComplete( - Object imported, - Object duplicated, - Object failed, - ); + /// **'Import complete: {imported} successfully imported and {failed} failed.'** + String importGalleryComplete(Object imported, Object failed); /// No description provided for @importGalleryGrantAccess. /// @@ -3804,54 +3734,18 @@ abstract class AppLocalizations { /// **'These friends either have not yet received their share or do not use twonly actively anymore, which could mean that they maybe cannot help.'** String get passwordlessRecoveryInactiveFriendsDesc; - /// No description provided for @passwordlessRecoveryNotEnoughFriends. - /// - /// In en, this message translates to: - /// **'Not enough friends selected. You need at least 3.'** - String get passwordlessRecoveryNotEnoughFriends; - - /// No description provided for @passwordlessRecoveryLoading. - /// - /// In en, this message translates to: - /// **'Loading...'** - String get passwordlessRecoveryLoading; - /// No description provided for @passwordlessRecoveryEnableSuccess. /// /// In en, this message translates to: /// **'Passwordless recovery successfully enabled!'** String get passwordlessRecoveryEnableSuccess; - /// No description provided for @passwordlessRecoveryEnableFailed. - /// - /// In en, this message translates to: - /// **'Failed to enable passwordless recovery.'** - String get passwordlessRecoveryEnableFailed; - - /// No description provided for @passwordlessRecoveryNeedAtLeast3. - /// - /// In en, this message translates to: - /// **'You need at least 3 trusted friends.'** - String get passwordlessRecoveryNeedAtLeast3; - - /// No description provided for @passwordlessRecoveryInvalidPin. - /// - /// In en, this message translates to: - /// **'Invalid PIN'** - String get passwordlessRecoveryInvalidPin; - /// No description provided for @passwordlessRecoveryEnterPin. /// /// In en, this message translates to: /// **'Please enter a PIN.'** String get passwordlessRecoveryEnterPin; - /// No description provided for @passwordlessRecoveryPinMinLength. - /// - /// In en, this message translates to: - /// **'PIN must be at least 4 digits.'** - String get passwordlessRecoveryPinMinLength; - /// No description provided for @passwordlessRecoveryEnterEmail. /// /// In en, this message translates to: @@ -4134,12 +4028,6 @@ abstract class AppLocalizations { /// **'Yes ({seconds}s)'** String passwordlessRecoveryYesWithTimer(Object seconds); - /// No description provided for @recoverPasswordlessBeingRecoveredLabel. - /// - /// In en, this message translates to: - /// **'Account being recovered'** - String get recoverPasswordlessBeingRecoveredLabel; - /// No description provided for @recoverPasswordlessSharesReceived. /// /// In en, this message translates to: diff --git a/lib/src/localization/generated/app_localizations_de.dart b/lib/src/localization/generated/app_localizations_de.dart index f0daeed9..062d9b29 100644 --- a/lib/src/localization/generated/app_localizations_de.dart +++ b/lib/src/localization/generated/app_localizations_de.dart @@ -459,10 +459,6 @@ class AppLocalizationsDe extends AppLocalizations { @override String get verificationTypeLink => 'Per Link verifiziert.'; - @override - String get verificationTypeContactSharedByVerified => - 'Von einem verifizierten Kontakt geteilt bekommen.'; - @override String get verificationTypeMigratedFromOldVersion => 'Von alter Version migriert'; @@ -883,9 +879,6 @@ class AppLocalizationsDe extends AppLocalizations { @override String get retransmissionRequested => 'Wird erneut versucht.'; - @override - String get openChangeLog => 'Changelog automatisch öffnen'; - @override String reportUserTitle(Object username) { return 'Melde $username'; @@ -1146,10 +1139,6 @@ class AppLocalizationsDe extends AppLocalizations { @override String get notificationContactRequest => 'möchte sich mit dir vernetzen.'; - @override - String get notificationContactRequestUnknownUser => - 'hast eine neue Kontaktanfrage erhalten.'; - @override String get notificationAcceptRequest => 'ist jetzt mit dir vernetzt.'; @@ -1187,12 +1176,6 @@ class AppLocalizationsDe extends AppLocalizations { return 'hat dir$inGroup geantwortet.'; } - @override - String get notificationTitleUnknown => 'Du hast eine neue Nachricht.'; - - @override - String get notificationBodyUnknown => 'Öffne twonly um mehr zu erfahren.'; - @override String get notificationCategoryMessageTitle => 'Nachrichten'; @@ -1353,9 +1336,6 @@ class AppLocalizationsDe extends AppLocalizations { String get onboardingBackupBody => 'Sichere deine twonly-Identität, da dies die einzige Möglichkeit ist, dein Konto wiederherzustellen, wenn du die App deinstallierst oder dein Handy verlierst.'; - @override - String get onboardingVerificationBadgeTitle => 'Verifizierungs-Haken'; - @override String get onboardingUserDiscoveryShareFriends => 'Freunde teilen'; @@ -1972,31 +1952,12 @@ class AppLocalizationsDe extends AppLocalizations { String get onboardingProfileSelectionCustomizeDesc => 'Schritt-für-Schritt-Einrichtung, damit du selbst entscheiden kannst.'; - @override - String get onboardingProfileSelectionStrictTitle => 'Erhöhter Schutz'; - - @override - String get onboardingProfileSelectionStrictDesc => - 'Maximaler Schutz vor Phishing. Empfohlen für *Journalisten & Personen des öffentlichen Lebens*.'; - @override String get replyFlameRestored => 'Flammen wiederhergestellt'; @override String get replyAskAFriend => 'Einen Freund fragen'; - @override - String get unverifiedWarningDirectTitle => - 'Identität nicht persönlich verifiziert'; - - @override - String get unverifiedWarningGroupTitle => - 'Nicht alle Mitglieder sind persönlich verifiziert'; - - @override - String get unverifiedWarningBody => - '*Teile keine geheimen Daten*. Jemand könnte sich *als dein Freund ausgeben*.'; - @override String get unverifiedWarningButton => 'Jetzt verifizieren'; @@ -2048,12 +2009,8 @@ class AppLocalizationsDe extends AppLocalizations { String get importGalleryStarting => 'Import wird gestartet...'; @override - String importGalleryComplete( - Object imported, - Object duplicated, - Object failed, - ) { - return 'Import abgeschlossen: $imported erfolgreich importiert, $duplicated Duplikate und $failed fehlgeschlagen.'; + String importGalleryComplete(Object imported, Object failed) { + return 'Import abgeschlossen: $imported erfolgreich importiert und $failed fehlgeschlagen.'; } @override @@ -2190,35 +2147,13 @@ class AppLocalizationsDe extends AppLocalizations { String get passwordlessRecoveryInactiveFriendsDesc => 'Diese Freunde haben entweder ihren Teil noch nicht erhalten oder nutzen twonly nicht mehr aktiv, was bedeutet, dass sie möglicherweise nicht helfen können.'; - @override - String get passwordlessRecoveryNotEnoughFriends => - 'Nicht genügend Freunde ausgewählt. Du brauchst mindestens 3.'; - - @override - String get passwordlessRecoveryLoading => 'Wird geladen...'; - @override String get passwordlessRecoveryEnableSuccess => 'Passwortloses Backup erfolgreich aktiviert!'; - @override - String get passwordlessRecoveryEnableFailed => - 'Fehler beim Aktivieren des passwortlosen Backups.'; - - @override - String get passwordlessRecoveryNeedAtLeast3 => - 'Du brauchst mindestens 3 Freunde.'; - - @override - String get passwordlessRecoveryInvalidPin => 'Ungültige PIN'; - @override String get passwordlessRecoveryEnterPin => 'Bitte gib eine PIN ein.'; - @override - String get passwordlessRecoveryPinMinLength => - 'Die PIN muss mindestens 4 Ziffern lang sein.'; - @override String get passwordlessRecoveryEnterEmail => 'Bitte gib eine E-Mail-Adresse ein.'; @@ -2396,10 +2331,6 @@ class AppLocalizationsDe extends AppLocalizations { return 'Ja (${seconds}s)'; } - @override - String get recoverPasswordlessBeingRecoveredLabel => - 'Konto wird wiederhergestellt'; - @override String recoverPasswordlessSharesReceived(Object received, Object threshold) { return '$received von $threshold Freunden haben geholfen'; diff --git a/lib/src/localization/generated/app_localizations_en.dart b/lib/src/localization/generated/app_localizations_en.dart index f0f3dc5e..c84e928f 100644 --- a/lib/src/localization/generated/app_localizations_en.dart +++ b/lib/src/localization/generated/app_localizations_en.dart @@ -455,10 +455,6 @@ class AppLocalizationsEn extends AppLocalizations { @override String get verificationTypeLink => 'Verified via link.'; - @override - String get verificationTypeContactSharedByVerified => - 'Contact received from a verified contact.'; - @override String get verificationTypeMigratedFromOldVersion => 'Migrated from old version.'; @@ -878,9 +874,6 @@ class AppLocalizationsEn extends AppLocalizations { @override String get retransmissionRequested => 'Retransmission requested'; - @override - String get openChangeLog => 'Open changelog automatically'; - @override String reportUserTitle(Object username) { return 'Report $username'; @@ -1140,10 +1133,6 @@ class AppLocalizationsEn extends AppLocalizations { @override String get notificationContactRequest => 'wants to connect with you.'; - @override - String get notificationContactRequestUnknownUser => - 'have received a new contact request.'; - @override String get notificationAcceptRequest => 'is now connected with you.'; @@ -1181,12 +1170,6 @@ class AppLocalizationsEn extends AppLocalizations { return 'has responded$inGroup.'; } - @override - String get notificationTitleUnknown => 'You have a new message.'; - - @override - String get notificationBodyUnknown => 'Open twonly to learn more.'; - @override String get notificationCategoryMessageTitle => 'Messages'; @@ -1345,9 +1328,6 @@ class AppLocalizationsEn extends AppLocalizations { String get onboardingBackupBody => 'Back up your twonly identity, as this is the only way to restore your account if you uninstall the app or lose your phone.'; - @override - String get onboardingVerificationBadgeTitle => 'Verification Badge'; - @override String get onboardingUserDiscoveryShareFriends => 'Share your friends'; @@ -1958,30 +1938,12 @@ class AppLocalizationsEn extends AppLocalizations { String get onboardingProfileSelectionCustomizeDesc => 'Step-by-step setup so you can decide for yourself.'; - @override - String get onboardingProfileSelectionStrictTitle => 'Enhanced Protection'; - - @override - String get onboardingProfileSelectionStrictDesc => - 'Maximum anti-phishing defense. Recommended for *journalists & public figures*.'; - @override String get replyFlameRestored => 'Flames restored'; @override String get replyAskAFriend => 'Ask a friend'; - @override - String get unverifiedWarningDirectTitle => 'Identity not verified in person'; - - @override - String get unverifiedWarningGroupTitle => - 'Not all members are verified in person'; - - @override - String get unverifiedWarningBody => - '*Avoid sharing sensitive data*. Risk of *impersonation* without manual verification.'; - @override String get unverifiedWarningButton => 'Verify now'; @@ -2033,12 +1995,8 @@ class AppLocalizationsEn extends AppLocalizations { String get importGalleryStarting => 'Starting import...'; @override - String importGalleryComplete( - Object imported, - Object duplicated, - Object failed, - ) { - return 'Import complete: $imported successfully imported, $duplicated duplicated and $failed failed.'; + String importGalleryComplete(Object imported, Object failed) { + return 'Import complete: $imported successfully imported and $failed failed.'; } @override @@ -2175,35 +2133,13 @@ class AppLocalizationsEn extends AppLocalizations { String get passwordlessRecoveryInactiveFriendsDesc => 'These friends either have not yet received their share or do not use twonly actively anymore, which could mean that they maybe cannot help.'; - @override - String get passwordlessRecoveryNotEnoughFriends => - 'Not enough friends selected. You need at least 3.'; - - @override - String get passwordlessRecoveryLoading => 'Loading...'; - @override String get passwordlessRecoveryEnableSuccess => 'Passwordless recovery successfully enabled!'; - @override - String get passwordlessRecoveryEnableFailed => - 'Failed to enable passwordless recovery.'; - - @override - String get passwordlessRecoveryNeedAtLeast3 => - 'You need at least 3 trusted friends.'; - - @override - String get passwordlessRecoveryInvalidPin => 'Invalid PIN'; - @override String get passwordlessRecoveryEnterPin => 'Please enter a PIN.'; - @override - String get passwordlessRecoveryPinMinLength => - 'PIN must be at least 4 digits.'; - @override String get passwordlessRecoveryEnterEmail => 'Please enter an email address.'; @@ -2374,10 +2310,6 @@ class AppLocalizationsEn extends AppLocalizations { return 'Yes (${seconds}s)'; } - @override - String get recoverPasswordlessBeingRecoveredLabel => - 'Account being recovered'; - @override String recoverPasswordlessSharesReceived(Object received, Object threshold) { return '$received out of $threshold friends have helped'; diff --git a/lib/src/localization/translations b/lib/src/localization/translations index 2a54bd8e..ef0aed22 160000 --- a/lib/src/localization/translations +++ b/lib/src/localization/translations @@ -1 +1 @@ -Subproject commit 2a54bd8e7f2021c5159c92b2e1dff8c8ed4effdc +Subproject commit ef0aed22f39a7453a9dbdbe26a098159b792dbac diff --git a/lib/src/visual/views/settings/data_and_storage/import_from_gallery.view.dart b/lib/src/visual/views/settings/data_and_storage/import_from_gallery.view.dart index 6755eace..4a257d32 100644 --- a/lib/src/visual/views/settings/data_and_storage/import_from_gallery.view.dart +++ b/lib/src/visual/views/settings/data_and_storage/import_from_gallery.view.dart @@ -64,7 +64,6 @@ class _ImportFromGalleryViewState extends State { final total = uris.length; var importedCount = 0; - var duplicated = 0; var failedCount = 0; for (final uri in uris) { @@ -137,7 +136,6 @@ class _ImportFromGalleryViewState extends State { context, context.lang.importGalleryComplete( importedCount, - duplicated, failedCount, ), level: SnackbarLevel.success, @@ -329,7 +327,6 @@ class _ImportFromGalleryViewState extends State { .toList(); final total = selectedAssets.length; var importedCount = 0; - var duplicated = 0; var failedCount = 0; for (final asset in selectedAssets) { @@ -352,7 +349,11 @@ class _ImportFromGalleryViewState extends State { final exists = await twonlyDB.mediaFilesDao.getMediaByHash(hash); if (exists.isNotEmpty) { - duplicated += 1; + final mediaFile = exists.first; + final mediaService = MediaFileService(mediaFile); + await mediaService.storedPath.parent.create(recursive: true); + await file.copy(mediaService.storedPath.path); + importedCount++; continue; } @@ -446,7 +447,6 @@ class _ImportFromGalleryViewState extends State { context, context.lang.importGalleryComplete( importedCount, - duplicated, failedCount, ), level: SnackbarLevel.success,