mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-25 08:30:41 +00:00
Fix translate button for boosts (#629)
This commit is contained in:
parent
dd28e7bccb
commit
4e69401b6c
1 changed files with 3 additions and 4 deletions
|
@ -76,16 +76,15 @@ struct StatusRowContextMenu: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let lang = preferences.serverPreferences?.postLanguage ?? Locale.current.language.languageCode?.identifier,
|
if let lang = preferences.serverPreferences?.postLanguage ?? Locale.current.language.languageCode?.identifier,
|
||||||
viewModel.status.language != lang
|
let statusLanguage = viewModel.status.reblog?.language ?? viewModel.status.language,
|
||||||
|
statusLanguage != lang
|
||||||
{
|
{
|
||||||
Button {
|
Button {
|
||||||
Task {
|
Task {
|
||||||
await viewModel.translate(userLang: lang)
|
await viewModel.translate(userLang: lang)
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
if let statusLanguage = viewModel.status.language,
|
if let languageName = Locale.current.localizedString(forLanguageCode: statusLanguage) {
|
||||||
let languageName = Locale.current.localizedString(forLanguageCode: statusLanguage)
|
|
||||||
{
|
|
||||||
Label("status.action.translate-from-\(languageName)", systemImage: "captions.bubble")
|
Label("status.action.translate-from-\(languageName)", systemImage: "captions.bubble")
|
||||||
} else {
|
} else {
|
||||||
Label("status.action.translate", systemImage: "captions.bubble")
|
Label("status.action.translate", systemImage: "captions.bubble")
|
||||||
|
|
Loading…
Reference in a new issue