mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 09:41:02 +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,
|
text: $imageDescription,
|
||||||
axis: .vertical)
|
axis: .vertical)
|
||||||
.focused($isFieldFocused)
|
.focused($isFieldFocused)
|
||||||
generateButton
|
if imageDescription.isEmpty {
|
||||||
translateButton
|
generateButton
|
||||||
|
} else {
|
||||||
|
translateButton
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
Section {
|
Section {
|
||||||
|
@ -113,8 +116,7 @@ extension StatusEditor {
|
||||||
if let description = await generateDescription(url: url) {
|
if let description = await generateDescription(url: url) {
|
||||||
imageDescription = description
|
imageDescription = description
|
||||||
#if canImport(_Translation_SwiftUI)
|
#if canImport(_Translation_SwiftUI)
|
||||||
let lang = preferences.serverPreferences?.postLanguage ?? Locale.current.language.languageCode?.identifier
|
if #available(iOS 17.4, *) {
|
||||||
if #available(iOS 17.4, *), lang != nil, lang != "en", DeepLUserAPIHandler.readKey().isEmpty == false {
|
|
||||||
withAnimation {
|
withAnimation {
|
||||||
showTranslateButton = true
|
showTranslateButton = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue