mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 23:50:36 +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,
|
||||
viewModel.status.language != lang
|
||||
let statusLanguage = viewModel.status.reblog?.language ?? viewModel.status.language,
|
||||
statusLanguage != lang
|
||||
{
|
||||
Button {
|
||||
Task {
|
||||
await viewModel.translate(userLang: lang)
|
||||
}
|
||||
} label: {
|
||||
if let statusLanguage = viewModel.status.language,
|
||||
let languageName = Locale.current.localizedString(forLanguageCode: statusLanguage)
|
||||
{
|
||||
if let languageName = Locale.current.localizedString(forLanguageCode: statusLanguage) {
|
||||
Label("status.action.translate-from-\(languageName)", systemImage: "captions.bubble")
|
||||
} else {
|
||||
Label("status.action.translate", systemImage: "captions.bubble")
|
||||
|
|
Loading…
Reference in a new issue