From 8e082fd5fefda1be0c1577559262ccdf710a7568 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 25 Jan 2024 16:42:32 +0100 Subject: [PATCH 01/13] feat: Create Model AutoAdvance --- MailCore/Models/Settings/AutoAdvance.swift | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 MailCore/Models/Settings/AutoAdvance.swift diff --git a/MailCore/Models/Settings/AutoAdvance.swift b/MailCore/Models/Settings/AutoAdvance.swift new file mode 100644 index 000000000..ec557f38c --- /dev/null +++ b/MailCore/Models/Settings/AutoAdvance.swift @@ -0,0 +1,53 @@ +/* + Infomaniak Mail - iOS App + Copyright (C) 2022 Infomaniak Network SA + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +import Foundation +import MailResources +import SwiftUI + +public enum AutoAdvance: String, CaseIterable, SettingsOptionEnum { + case previousThread + case followingThread + case listOfThread + + public var title: String { + switch self { + case .previousThread: + return MailResourcesStrings.Localizable.settingsAutoAdvancePreviousThreadTitle + case .followingThread: + return MailResourcesStrings.Localizable.settingsAutoAdvanceFollowingThreadTitle + case .listOfThread: + return MailResourcesStrings.Localizable.settingsAutoAdvanceListOfThreadsTitle + } + } + + public var description: String { + switch self { + case .previousThread: + return MailResourcesStrings.Localizable.settingsAutoAdvancePreviousThreadDescription + case .followingThread: + return MailResourcesStrings.Localizable.settingsAutoAdvanceFollowingThreadDescription + case .listOfThread: + return MailResourcesStrings.Localizable.settingsAutoAdvanceListOfThreadsDescription + } + } + + public var image: Image? { + return nil + } +} From 85f1011c3a7bd99d77111b1d1a400da4f0a5ed1b Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 25 Jan 2024 16:43:50 +0100 Subject: [PATCH 02/13] feat: Update UserDefaults --- Mail/Views/Settings/SettingsView.swift | 1 + MailCore/Models/Settings/DefaultPreferences.swift | 1 + MailCore/Utils/MailUserDefaults+Extension.swift | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/Mail/Views/Settings/SettingsView.swift b/Mail/Views/Settings/SettingsView.swift index 5af7a142f..6081d1875 100644 --- a/Mail/Views/Settings/SettingsView.swift +++ b/Mail/Views/Settings/SettingsView.swift @@ -37,6 +37,7 @@ struct SettingsView: View { @AppStorage(UserDefaults.shared.key(.accentColor)) private var accentColor = DefaultPreferences.accentColor @AppStorage(UserDefaults.shared.key(.externalContent)) private var externalContent = DefaultPreferences.externalContent @AppStorage(UserDefaults.shared.key(.threadMode)) private var threadMode = DefaultPreferences.threadMode + @AppStorage(UserDefaults.shared.key(.autoAdvance)) private var autoAdvance = DefaultPreferences.autoAdvance @State private var isShowingSyncProfile = false diff --git a/MailCore/Models/Settings/DefaultPreferences.swift b/MailCore/Models/Settings/DefaultPreferences.swift index 62707a174..943eda7d2 100644 --- a/MailCore/Models/Settings/DefaultPreferences.swift +++ b/MailCore/Models/Settings/DefaultPreferences.swift @@ -38,4 +38,5 @@ public enum DefaultPreferences { public static let featureFlags: FeatureFlagsManageable.AppFeatureFlags = [:] public static let shouldPresentAIFeature = true public static let aiEngine = AIEngine.falcon + public static let autoAdvance = AutoAdvance.listOfThread } diff --git a/MailCore/Utils/MailUserDefaults+Extension.swift b/MailCore/Utils/MailUserDefaults+Extension.swift index ce6523f73..e685d44f9 100644 --- a/MailCore/Utils/MailUserDefaults+Extension.swift +++ b/MailCore/Utils/MailUserDefaults+Extension.swift @@ -51,6 +51,7 @@ public extension UserDefaults.Keys { static let shouldPresentSyncDiscovery = UserDefaults.Keys(rawValue: "shouldPresentSyncDiscovery") static let shouldPresentSetAsDefaultDiscovery = UserDefaults.Keys(rawValue: "shouldPresentSetAsDefaultDiscovery") static let aiEngine = UserDefaults.Keys(rawValue: "aiEngine") + static let autoAdvance = UserDefaults.Keys(rawValue: "autoAdvance") } public extension UserDefaults { @@ -313,4 +314,13 @@ public extension UserDefaults { setValue(newValue.rawValue, forKey: key(.aiEngine)) } } + + var autoAdvance: AutoAdvance { + get { + return AutoAdvance(rawValue: string(forKey: key(.autoAdvance)) ?? "") ?? DefaultPreferences.autoAdvance + } + set { + set(newValue.rawValue, forKey: key(.autoAdvance)) + } + } } From 7e99e003563dc610a4f6860d1168106ae074f951 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 25 Jan 2024 16:44:49 +0100 Subject: [PATCH 03/13] feat: Add settings cell + view --- Mail/Views/Settings/SettingsView.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Mail/Views/Settings/SettingsView.swift b/Mail/Views/Settings/SettingsView.swift index 6081d1875..8d4fef0a2 100644 --- a/Mail/Views/Settings/SettingsView.swift +++ b/Mail/Views/Settings/SettingsView.swift @@ -174,6 +174,21 @@ struct SettingsView: View { matomoName: \.rawValue ) } + + // MARK: Auto Advance + + SettingsSubMenuCell( + title: MailResourcesStrings.Localizable.settingsAutoAdvanceTitle, + subtitle: autoAdvance.description + ) { + SettingsOptionView( + title: MailResourcesStrings.Localizable.settingsAutoAdvanceTitle, + subtitle: MailResourcesStrings.Localizable.settingsAutoAdvanceDescription, + keyPath: \.autoAdvance, + matomoCategory: .settingsAutoAdvance, + matomoName: \.rawValue + ) + } } } } From 928f7692ed1ea8ffc8b375c2b35947b31edb4271 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 25 Jan 2024 16:45:30 +0100 Subject: [PATCH 04/13] feat: Add Matomo --- MailCore/Utils/Matomo+Extension.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/MailCore/Utils/Matomo+Extension.swift b/MailCore/Utils/Matomo+Extension.swift index 87e51d025..6542697f5 100644 --- a/MailCore/Utils/Matomo+Extension.swift +++ b/MailCore/Utils/Matomo+Extension.swift @@ -86,6 +86,7 @@ public extension MatomoUtils.EventCategory { static let settingsSend = MatomoUtils.EventCategory(displayName: "settingsSend") static let settingsSwipeActions = MatomoUtils.EventCategory(displayName: "settingsSwipeActions") static let settingsThreadMode = MatomoUtils.EventCategory(displayName: "settingsThreadMode") + static let settingsAutoAdvance = MatomoUtils.EventCategory(displayName: "settingsAutoAdvance") } // MARK: - Helpers From f200b2bfacb7ac271a34d0fa10ff453255d730da Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Mon, 29 Jan 2024 13:19:03 +0100 Subject: [PATCH 05/13] fix: Align subtitle text to the left --- Mail/Views/Settings/SettingsSubMenuCell.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Mail/Views/Settings/SettingsSubMenuCell.swift b/Mail/Views/Settings/SettingsSubMenuCell.swift index 2bf1ced47..a2d5387e1 100644 --- a/Mail/Views/Settings/SettingsSubMenuCell.swift +++ b/Mail/Views/Settings/SettingsSubMenuCell.swift @@ -35,6 +35,7 @@ struct SettingsSubMenuLabel: View { if let subtitle { Text(subtitle) .textStyle(.bodySmallTertiary) + .multilineTextAlignment(.leading) } } .frame(maxWidth: .infinity, alignment: .leading) From 47896e828fc5088e2a2c18bf76121e145b3e6fe7 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Tue, 30 Jan 2024 11:07:57 +0100 Subject: [PATCH 06/13] feat: Update view following user settings --- Mail/Views/Thread List/ThreadListViewModel.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Mail/Views/Thread List/ThreadListViewModel.swift b/Mail/Views/Thread List/ThreadListViewModel.swift index 71f012cb8..8c540c354 100644 --- a/Mail/Views/Thread List/ThreadListViewModel.swift +++ b/Mail/Views/Thread List/ThreadListViewModel.swift @@ -218,11 +218,15 @@ final class DateSection: Identifiable, Equatable { return } - if isCompact { - selectedThreadOwner.selectedThread = nil - } else { + switch UserDefaults.shared.autoAdvance { + case .previousThread: + let validIndex = max(oldSelectedThreadIndex - 1, 0) + selectedThreadOwner.selectedThread = newThreads[validIndex] + case .followingThread: let validIndex = min(oldSelectedThreadIndex, newThreads.count - 1) selectedThreadOwner.selectedThread = newThreads[validIndex] + case .listOfThread: + selectedThreadOwner.selectedThread = nil } } From 2ae20d61f5fd101f8512fd12141ac1055524a763 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Wed, 31 Jan 2024 20:44:45 +0100 Subject: [PATCH 07/13] feat: Create SettingsAutoAdvanceView --- .../Appearance/SettingsAutoAdvanceView.swift | 67 +++++++++++++++++++ Mail/Views/Settings/SettingsView.swift | 8 +-- 2 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift diff --git a/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift new file mode 100644 index 000000000..c13feb440 --- /dev/null +++ b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift @@ -0,0 +1,67 @@ +/* + Infomaniak Mail - iOS App + Copyright (C) 2022 Infomaniak Network SA + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +import InfomaniakCoreUI +import InfomaniakDI +import MailCore +import MailResources +import SwiftUI + +enum AutoAdvanceSection: CaseIterable { + case compact + case large + + var options: [AutoAdvance] { + switch self { + case .compact: + return [.previousThread, .followingThread, .listOfThread] + case .large: + return [.previousThread, .followingThread] + } + } +} + +struct SettingsAutoAdvanceView: View { + @LazyInjectService private var matomo: MatomoUtils + + @AppStorage(UserDefaults.shared.key(.autoAdvance)) private var autoAdvance = DefaultPreferences.autoAdvance + + var completionHandler: (() -> Void)? + + var section: AutoAdvanceSection + + var body: some View { + ScrollView { + SettingsSectionTitleView(title: MailResourcesStrings.Localizable.settingsAutoAdvanceDescription) + + ForEach(section.options, id: \.rawValue) { option in + SettingsOptionCell(value: option, isSelected: option == autoAdvance, isLast: option == section.options.last) { + matomo.track(eventWithCategory: .settingsAutoAdvance, name: option.rawValue) + autoAdvance = option + completionHandler?() + } + } + } + .background(MailResourcesAsset.backgroundColor.swiftUIColor) + .navigationTitle(MailResourcesStrings.Localizable.settingsAutoAdvanceTitle) + } +} + +#Preview { + SettingsAutoAdvanceView(section: .compact) +} diff --git a/Mail/Views/Settings/SettingsView.swift b/Mail/Views/Settings/SettingsView.swift index 8d4fef0a2..d90eddbdc 100644 --- a/Mail/Views/Settings/SettingsView.swift +++ b/Mail/Views/Settings/SettingsView.swift @@ -181,13 +181,7 @@ struct SettingsView: View { title: MailResourcesStrings.Localizable.settingsAutoAdvanceTitle, subtitle: autoAdvance.description ) { - SettingsOptionView( - title: MailResourcesStrings.Localizable.settingsAutoAdvanceTitle, - subtitle: MailResourcesStrings.Localizable.settingsAutoAdvanceDescription, - keyPath: \.autoAdvance, - matomoCategory: .settingsAutoAdvance, - matomoName: \.rawValue - ) + SettingsAutoAdvanceView(section: .compact) } } } From 6516e62913f3d090e4c3fa7313000678522d7ab5 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 1 Feb 2024 11:00:37 +0100 Subject: [PATCH 08/13] fix: Rename case --- Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift index c13feb440..6773d3df7 100644 --- a/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift +++ b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift @@ -24,13 +24,13 @@ import SwiftUI enum AutoAdvanceSection: CaseIterable { case compact - case large + case regular var options: [AutoAdvance] { switch self { case .compact: return [.previousThread, .followingThread, .listOfThread] - case .large: + case .regular: return [.previousThread, .followingThread] } } From e38902af955025027134eec0a1602c2d6118d795 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 1 Feb 2024 11:01:55 +0100 Subject: [PATCH 09/13] feat: Show settings depending screen size --- Mail/Views/Settings/SettingsView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mail/Views/Settings/SettingsView.swift b/Mail/Views/Settings/SettingsView.swift index d90eddbdc..f5528f079 100644 --- a/Mail/Views/Settings/SettingsView.swift +++ b/Mail/Views/Settings/SettingsView.swift @@ -31,6 +31,8 @@ struct SettingsView: View { @EnvironmentObject private var mailboxManager: MailboxManager + @Environment(\.isCompactWindow) private var isCompactWindow + @AppStorage(UserDefaults.shared.key(.aiEngine)) private var aiEngine = DefaultPreferences.aiEngine @AppStorage(UserDefaults.shared.key(.threadDensity)) private var density = DefaultPreferences.threadDensity @AppStorage(UserDefaults.shared.key(.theme)) private var theme = DefaultPreferences.theme @@ -181,7 +183,7 @@ struct SettingsView: View { title: MailResourcesStrings.Localizable.settingsAutoAdvanceTitle, subtitle: autoAdvance.description ) { - SettingsAutoAdvanceView(section: .compact) + SettingsAutoAdvanceView(section: isCompactWindow ? .compact : .regular) } } } From 3fdccb8ffdfa7f3299138905d52a5921657d4fd9 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 1 Feb 2024 11:04:39 +0100 Subject: [PATCH 10/13] fix: Remove unused var --- Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift | 3 --- Mail/Views/Thread List/ThreadListCell.swift | 3 +-- Mail/Views/Thread List/ThreadListView.swift | 3 +-- Mail/Views/Thread List/ThreadListViewModel.swift | 5 +---- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift index 6773d3df7..65f05ef7e 100644 --- a/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift +++ b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift @@ -41,8 +41,6 @@ struct SettingsAutoAdvanceView: View { @AppStorage(UserDefaults.shared.key(.autoAdvance)) private var autoAdvance = DefaultPreferences.autoAdvance - var completionHandler: (() -> Void)? - var section: AutoAdvanceSection var body: some View { @@ -53,7 +51,6 @@ struct SettingsAutoAdvanceView: View { SettingsOptionCell(value: option, isSelected: option == autoAdvance, isLast: option == section.options.last) { matomo.track(eventWithCategory: .settingsAutoAdvance, name: option.rawValue) autoAdvance = option - completionHandler?() } } } diff --git a/Mail/Views/Thread List/ThreadListCell.swift b/Mail/Views/Thread List/ThreadListCell.swift index 4dba6000c..70bca5d9a 100644 --- a/Mail/Views/Thread List/ThreadListCell.swift +++ b/Mail/Views/Thread List/ThreadListCell.swift @@ -127,8 +127,7 @@ struct ThreadListCell: View { ThreadListCell( viewModel: ThreadListViewModel(mailboxManager: PreviewHelper.sampleMailboxManager, frozenFolder: PreviewHelper.sampleFolder, - selectedThreadOwner: PreviewHelper.mockSelectedThreadOwner, - isCompact: false), + selectedThreadOwner: PreviewHelper.mockSelectedThreadOwner), multipleSelectionViewModel: ThreadListMultipleSelectionViewModel(), thread: PreviewHelper.sampleThread, threadDensity: .large, diff --git a/Mail/Views/Thread List/ThreadListView.swift b/Mail/Views/Thread List/ThreadListView.swift index c44de0ee2..12c0a056a 100644 --- a/Mail/Views/Thread List/ThreadListView.swift +++ b/Mail/Views/Thread List/ThreadListView.swift @@ -58,8 +58,7 @@ struct ThreadListView: View { isCompact: Bool) { _viewModel = StateObject(wrappedValue: ThreadListViewModel(mailboxManager: mailboxManager, frozenFolder: frozenFolder, - selectedThreadOwner: selectedThreadOwner, - isCompact: isCompact)) + selectedThreadOwner: selectedThreadOwner)) _multipleSelectionViewModel = StateObject(wrappedValue: ThreadListMultipleSelectionViewModel()) UITableViewCell.appearance().focusEffect = .none diff --git a/Mail/Views/Thread List/ThreadListViewModel.swift b/Mail/Views/Thread List/ThreadListViewModel.swift index 8c540c354..84a06eb59 100644 --- a/Mail/Views/Thread List/ThreadListViewModel.swift +++ b/Mail/Views/Thread List/ThreadListViewModel.swift @@ -117,7 +117,6 @@ final class DateSection: Identifiable, Equatable { var filteredThreads = [Thread]() var scrollViewProxy: ScrollViewProxy? - var isCompact: Bool /// Observe a filtered thread var observeFilteredThreadsToken: NotificationToken? @@ -169,14 +168,12 @@ final class DateSection: Identifiable, Equatable { init( mailboxManager: MailboxManager, frozenFolder: Folder, - selectedThreadOwner: SelectedThreadOwnable, - isCompact: Bool + selectedThreadOwner: SelectedThreadOwnable ) { assert(frozenFolder.isFrozen, "ThreadListViewModel.folder should always be frozen") self.mailboxManager = mailboxManager self.frozenFolder = frozenFolder self.selectedThreadOwner = selectedThreadOwner - self.isCompact = isCompact sectionsObserver = sectionsSubject .receive(on: DispatchQueue.main) .sink { [weak self] newSections in From 2f62a7c99add1479ebd4d5119fd31a0e65b0beee Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 1 Feb 2024 11:42:02 +0100 Subject: [PATCH 11/13] fix(SettingsAutoAdvanceView): Rectify cells size --- .../Appearance/SettingsAutoAdvanceView.swift | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift index 65f05ef7e..e8b29ecb8 100644 --- a/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift +++ b/Mail/Views/Settings/Appearance/SettingsAutoAdvanceView.swift @@ -44,15 +44,19 @@ struct SettingsAutoAdvanceView: View { var section: AutoAdvanceSection var body: some View { - ScrollView { - SettingsSectionTitleView(title: MailResourcesStrings.Localizable.settingsAutoAdvanceDescription) + VStack { + List { + SettingsSectionTitleView(title: MailResourcesStrings.Localizable.settingsAutoAdvanceDescription) + .settingsCell() - ForEach(section.options, id: \.rawValue) { option in - SettingsOptionCell(value: option, isSelected: option == autoAdvance, isLast: option == section.options.last) { - matomo.track(eventWithCategory: .settingsAutoAdvance, name: option.rawValue) - autoAdvance = option + ForEach(section.options, id: \.rawValue) { option in + SettingsOptionCell(value: option, isSelected: option == autoAdvance, isLast: option == section.options.last) { + matomo.track(eventWithCategory: .settingsAutoAdvance, name: option.rawValue) + autoAdvance = option + } } } + .listStyle(.plain) } .background(MailResourcesAsset.backgroundColor.swiftUIColor) .navigationTitle(MailResourcesStrings.Localizable.settingsAutoAdvanceTitle) From eea4f8e9edceb12af26d445c7769d4a89d1a23e9 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 1 Feb 2024 12:58:13 +0100 Subject: [PATCH 12/13] fix: Loco --- .../Localizable/de.lproj/Localizable.strings | 27 +++++++++++++++++++ .../Localizable/en.lproj/Localizable.strings | 27 +++++++++++++++++++ .../Localizable/es.lproj/Localizable.strings | 27 +++++++++++++++++++ .../Localizable/fr.lproj/Localizable.strings | 27 +++++++++++++++++++ .../Localizable/it.lproj/Localizable.strings | 27 +++++++++++++++++++ 5 files changed, 135 insertions(+) diff --git a/MailResources/Localizable/de.lproj/Localizable.strings b/MailResources/Localizable/de.lproj/Localizable.strings index ef55b7557..f50b7daf3 100644 --- a/MailResources/Localizable/de.lproj/Localizable.strings +++ b/MailResources/Localizable/de.lproj/Localizable.strings @@ -1103,6 +1103,30 @@ /* loco:627a306b1e32027c033896b2 */ "settingsAppLock" = "App-Sperre"; +/* loco:65b275e7c53c28d1410bf342 */ +"settingsAutoAdvanceDescription" = "Auswählen, was angezeigt werden soll, wenn eine Nachricht archiviert oder gelöscht wird"; + +/* loco:65b27dc325bc06589501c462 */ +"settingsAutoAdvanceFollowingThreadDescription" = "Beim Archivieren oder Löschen folgenden Thread anzeigen\n"; + +/* loco:65b277d399fe1ebac10546a2 */ +"settingsAutoAdvanceFollowingThreadTitle" = "Folgender Thread"; + +/* loco:65b27e2b4f176d33ca06b302 */ +"settingsAutoAdvanceListOfThreadsDescription" = "Liste der Threads beim Archivieren oder Löschen anzeigen"; + +/* loco:65b2780c2b7256da8b038512 */ +"settingsAutoAdvanceListOfThreadsTitle" = "Liste der Themen"; + +/* loco:65b27d1e0565d99b930ae142 */ +"settingsAutoAdvancePreviousThreadDescription" = "Vorheriges Thema beim Archivieren oder Löschen anzeigen"; + +/* loco:65b277b504a5c5b4710041f3 */ +"settingsAutoAdvancePreviousThreadTitle" = "Voriges Thema"; + +/* loco:65b274f8719e4e08b103c7f4 */ +"settingsAutoAdvanceTitle" = "Autovorschuss"; + /* loco:62c693f572adfe66fd2a82b7 */ "settingsCancellationPeriodDescription" = "Sie haben die Möglichkeit, den Versand Ihrer E-Mail bis zu 30 Sekunden abzubrechen"; @@ -1412,6 +1436,9 @@ /* loco:626664d06926336d9e25c462 */ "subjectTitle" = "Thema:"; +/* loco:65ba2326ef9447c160013bf2 */ +"superCollapsedBlock" = "Alle sehen (%d)"; + /* loco:653112b14b84af451706ef56 */ "syncCalendarsAndContactsDescription" = "Sehen Sie sich Ihre Kontakte und Kalender direkt auf Ihrem Gerät an."; diff --git a/MailResources/Localizable/en.lproj/Localizable.strings b/MailResources/Localizable/en.lproj/Localizable.strings index 446fe67d2..787c6bb3b 100644 --- a/MailResources/Localizable/en.lproj/Localizable.strings +++ b/MailResources/Localizable/en.lproj/Localizable.strings @@ -1103,6 +1103,30 @@ /* loco:627a306b1e32027c033896b2 */ "settingsAppLock" = "App lock"; +/* loco:65b275e7c53c28d1410bf342 */ +"settingsAutoAdvanceDescription" = "Select what to display when a message is archived or deleted "; + +/* loco:65b27dc325bc06589501c462 */ +"settingsAutoAdvanceFollowingThreadDescription" = "Display following thread when archiving or deleting\n"; + +/* loco:65b277d399fe1ebac10546a2 */ +"settingsAutoAdvanceFollowingThreadTitle" = "Following thread"; + +/* loco:65b27e2b4f176d33ca06b302 */ +"settingsAutoAdvanceListOfThreadsDescription" = "Display list of threads when archiving or deleting"; + +/* loco:65b2780c2b7256da8b038512 */ +"settingsAutoAdvanceListOfThreadsTitle" = "List of threads"; + +/* loco:65b27d1e0565d99b930ae142 */ +"settingsAutoAdvancePreviousThreadDescription" = "Display previous thread when archiving or deleting"; + +/* loco:65b277b504a5c5b4710041f3 */ +"settingsAutoAdvancePreviousThreadTitle" = "Previous thread"; + +/* loco:65b274f8719e4e08b103c7f4 */ +"settingsAutoAdvanceTitle" = "Auto advance"; + /* loco:62c693f572adfe66fd2a82b7 */ "settingsCancellationPeriodDescription" = "You have the possibility to cancel the sending of your email up to 30 seconds"; @@ -1412,6 +1436,9 @@ /* loco:626664d06926336d9e25c462 */ "subjectTitle" = "Subject:"; +/* loco:65ba2326ef9447c160013bf2 */ +"superCollapsedBlock" = "See all (%d)"; + /* loco:653112b14b84af451706ef56 */ "syncCalendarsAndContactsDescription" = "View your contacts and calendar directly from your device."; diff --git a/MailResources/Localizable/es.lproj/Localizable.strings b/MailResources/Localizable/es.lproj/Localizable.strings index 6ae653090..7f973bcc6 100644 --- a/MailResources/Localizable/es.lproj/Localizable.strings +++ b/MailResources/Localizable/es.lproj/Localizable.strings @@ -1103,6 +1103,30 @@ /* loco:627a306b1e32027c033896b2 */ "settingsAppLock" = "Bloqueo de aplicaciones"; +/* loco:65b275e7c53c28d1410bf342 */ +"settingsAutoAdvanceDescription" = "Seleccione qué mostrar cuando se archiva o elimina un mensaje"; + +/* loco:65b27dc325bc06589501c462 */ +"settingsAutoAdvanceFollowingThreadDescription" = "Mostrar el siguiente hilo al archivar o borrar\n"; + +/* loco:65b277d399fe1ebac10546a2 */ +"settingsAutoAdvanceFollowingThreadTitle" = "Siguiendo el hilo"; + +/* loco:65b27e2b4f176d33ca06b302 */ +"settingsAutoAdvanceListOfThreadsDescription" = "Mostrar lista de hilos al archivar o borrar"; + +/* loco:65b2780c2b7256da8b038512 */ +"settingsAutoAdvanceListOfThreadsTitle" = "Lista de temas"; + +/* loco:65b27d1e0565d99b930ae142 */ +"settingsAutoAdvancePreviousThreadDescription" = "Mostrar el hilo anterior al archivar o borrar"; + +/* loco:65b277b504a5c5b4710041f3 */ +"settingsAutoAdvancePreviousThreadTitle" = "Tema anterior"; + +/* loco:65b274f8719e4e08b103c7f4 */ +"settingsAutoAdvanceTitle" = "Auto advance"; + /* loco:62c693f572adfe66fd2a82b7 */ "settingsCancellationPeriodDescription" = "Tiene la posibilidad de cancelar el envío de su correo electrónico hasta 30 segundos"; @@ -1412,6 +1436,9 @@ /* loco:626664d06926336d9e25c462 */ "subjectTitle" = "Asunto:"; +/* loco:65ba2326ef9447c160013bf2 */ +"superCollapsedBlock" = "Ver todos (%d)"; + /* loco:653112b14b84af451706ef56 */ "syncCalendarsAndContactsDescription" = "Consulta tus contactos y tu calendario directamente desde tu dispositivo."; diff --git a/MailResources/Localizable/fr.lproj/Localizable.strings b/MailResources/Localizable/fr.lproj/Localizable.strings index 55651e603..76452de37 100644 --- a/MailResources/Localizable/fr.lproj/Localizable.strings +++ b/MailResources/Localizable/fr.lproj/Localizable.strings @@ -1103,6 +1103,30 @@ /* loco:627a306b1e32027c033896b2 */ "settingsAppLock" = "Verrouillage de l’application"; +/* loco:65b275e7c53c28d1410bf342 */ +"settingsAutoAdvanceDescription" = "Sélectionnez ce que vous souhaitez afficher lorsqu’un message est archivé ou supprimé "; + +/* loco:65b27dc325bc06589501c462 */ +"settingsAutoAdvanceFollowingThreadDescription" = "Afficher la conversation suivante après archivage ou suppression"; + +/* loco:65b277d399fe1ebac10546a2 */ +"settingsAutoAdvanceFollowingThreadTitle" = "Conversation suivante"; + +/* loco:65b27e2b4f176d33ca06b302 */ +"settingsAutoAdvanceListOfThreadsDescription" = "Afficher la liste des conversations après archivage ou suppression"; + +/* loco:65b2780c2b7256da8b038512 */ +"settingsAutoAdvanceListOfThreadsTitle" = "Liste des conversations"; + +/* loco:65b27d1e0565d99b930ae142 */ +"settingsAutoAdvancePreviousThreadDescription" = "Afficher la conversation précédente après archivage ou suppression"; + +/* loco:65b277b504a5c5b4710041f3 */ +"settingsAutoAdvancePreviousThreadTitle" = "Conversation précédente"; + +/* loco:65b274f8719e4e08b103c7f4 */ +"settingsAutoAdvanceTitle" = "Avance Automatique"; + /* loco:62c693f572adfe66fd2a82b7 */ "settingsCancellationPeriodDescription" = "Vous avez la possibilité d’annuler l’envoi de votre e-mail jusqu’à 30 secondes"; @@ -1412,6 +1436,9 @@ /* loco:626664d06926336d9e25c462 */ "subjectTitle" = "Objet :"; +/* loco:65ba2326ef9447c160013bf2 */ +"superCollapsedBlock" = "Voir tout (%d)"; + /* loco:653112b14b84af451706ef56 */ "syncCalendarsAndContactsDescription" = "Consultez vos contacts et calendriers directement depuis votre appareil."; diff --git a/MailResources/Localizable/it.lproj/Localizable.strings b/MailResources/Localizable/it.lproj/Localizable.strings index 558e2271b..754b1fcfd 100644 --- a/MailResources/Localizable/it.lproj/Localizable.strings +++ b/MailResources/Localizable/it.lproj/Localizable.strings @@ -1103,6 +1103,30 @@ /* loco:627a306b1e32027c033896b2 */ "settingsAppLock" = "Blocco dell’app"; +/* loco:65b275e7c53c28d1410bf342 */ +"settingsAutoAdvanceDescription" = "Selezionare cosa visualizzare quando un messaggio viene archiviato o eliminato"; + +/* loco:65b27dc325bc06589501c462 */ +"settingsAutoAdvanceFollowingThreadDescription" = "Visualizza la seguente discussione quando si archivia o si elimina\n"; + +/* loco:65b277d399fe1ebac10546a2 */ +"settingsAutoAdvanceFollowingThreadTitle" = "Seguendo il filo conduttore"; + +/* loco:65b27e2b4f176d33ca06b302 */ +"settingsAutoAdvanceListOfThreadsDescription" = "Visualizzazione dell’elenco delle discussioni durante l’archiviazione o la cancellazione"; + +/* loco:65b2780c2b7256da8b038512 */ +"settingsAutoAdvanceListOfThreadsTitle" = "Elenco delle discussioni"; + +/* loco:65b27d1e0565d99b930ae142 */ +"settingsAutoAdvancePreviousThreadDescription" = "Visualizzazione della discussione precedente quando si archivia o si elimina"; + +/* loco:65b277b504a5c5b4710041f3 */ +"settingsAutoAdvancePreviousThreadTitle" = "Filo conduttore precedente"; + +/* loco:65b274f8719e4e08b103c7f4 */ +"settingsAutoAdvanceTitle" = "Anticipo auto"; + /* loco:62c693f572adfe66fd2a82b7 */ "settingsCancellationPeriodDescription" = "Avete la possibilità di annullare l’invio della vostra email fino a 30 secondi."; @@ -1412,6 +1436,9 @@ /* loco:626664d06926336d9e25c462 */ "subjectTitle" = "Oggetto:"; +/* loco:65ba2326ef9447c160013bf2 */ +"superCollapsedBlock" = "Vedi tutti (%d)"; + /* loco:653112b14b84af451706ef56 */ "syncCalendarsAndContactsDescription" = "Visualizza i contatti e il calendario direttamente dal dispositivo."; From 37bfedd8a7ceb3f06e0f821395f3ed53b954b8b4 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Thu, 1 Feb 2024 15:10:48 +0100 Subject: [PATCH 13/13] fix: Change default preference if iPad --- MailCore/Models/Settings/DefaultPreferences.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MailCore/Models/Settings/DefaultPreferences.swift b/MailCore/Models/Settings/DefaultPreferences.swift index 943eda7d2..252f02529 100644 --- a/MailCore/Models/Settings/DefaultPreferences.swift +++ b/MailCore/Models/Settings/DefaultPreferences.swift @@ -17,6 +17,7 @@ */ import Foundation +import UIKit public enum DefaultPreferences { public static let notificationsEnabled = true @@ -38,5 +39,5 @@ public enum DefaultPreferences { public static let featureFlags: FeatureFlagsManageable.AppFeatureFlags = [:] public static let shouldPresentAIFeature = true public static let aiEngine = AIEngine.falcon - public static let autoAdvance = AutoAdvance.listOfThread + public static let autoAdvance = UIDevice.current.userInterfaceIdiom == .pad ? AutoAdvance.followingThread : AutoAdvance.listOfThread }