mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-02 21:39:36 +00:00
Hide Apple Translate if not yet on iOS 17.4
The Apple Translate option is hidden if the user hasn't updated their phone to at least iOS 17.4. If the Apple Translate option is selected but the user has downgraded to before iOS 17.4, the standard instance option is selected.
This commit is contained in:
parent
40a11061b7
commit
b228c1e36b
|
@ -54,7 +54,11 @@ struct TranslationSettingsView: View {
|
|||
@Bindable var preferences = preferences
|
||||
Picker("settings.translation.preferred-translation-type", selection: $preferences.preferredTranslationType) {
|
||||
ForEach(TranslationType.allCases, id: \.self) { type in
|
||||
Text(type.description).tag(type)
|
||||
if #available(iOS 17.4, *) {
|
||||
Text(type.description).tag(type)
|
||||
} else if type != .useApple {
|
||||
Text(type.description).tag(type)
|
||||
}
|
||||
}
|
||||
}
|
||||
#if !os(visionOS)
|
||||
|
|
|
@ -71,6 +71,10 @@ import SwiftUI
|
|||
}
|
||||
sharedDefault.removeObject(forKey: "always_use_deepl")
|
||||
}
|
||||
if #unavailable(iOS 17.4),
|
||||
preferredTranslationType == .useApple {
|
||||
preferredTranslationType = .useServerIfPossible
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue