mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-26 00:50:38 +00:00
Improve media alt edit
This commit is contained in:
parent
a996aace80
commit
86c053344b
1 changed files with 6 additions and 4 deletions
|
@ -35,8 +35,11 @@ extension StatusEditor {
|
|||
text: $imageDescription,
|
||||
axis: .vertical)
|
||||
.focused($isFieldFocused)
|
||||
generateButton
|
||||
translateButton
|
||||
if imageDescription.isEmpty {
|
||||
generateButton
|
||||
} else {
|
||||
translateButton
|
||||
}
|
||||
}
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
Section {
|
||||
|
@ -113,8 +116,7 @@ extension StatusEditor {
|
|||
if let description = await generateDescription(url: url) {
|
||||
imageDescription = description
|
||||
#if canImport(_Translation_SwiftUI)
|
||||
let lang = preferences.serverPreferences?.postLanguage ?? Locale.current.language.languageCode?.identifier
|
||||
if #available(iOS 17.4, *), lang != nil, lang != "en", DeepLUserAPIHandler.readKey().isEmpty == false {
|
||||
if #available(iOS 17.4, *) {
|
||||
withAnimation {
|
||||
showTranslateButton = true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue