mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-25 14:32:20 +01:00
Always load translate
This commit is contained in:
parent
d00b66034d
commit
022b068ce8
@ -288,11 +288,11 @@ public class StatusRowViewModel: ObservableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func translate(userLang: String) async {
|
func translate(userLang: String) async {
|
||||||
|
withAnimation {
|
||||||
|
isLoadingTranslation = true
|
||||||
|
}
|
||||||
if !alwaysTranslateWithDeepl {
|
if !alwaysTranslateWithDeepl {
|
||||||
do {
|
do {
|
||||||
withAnimation {
|
|
||||||
isLoadingTranslation = true
|
|
||||||
}
|
|
||||||
// We first use instance translation API if available.
|
// We first use instance translation API if available.
|
||||||
let translation: StatusTranslation = try await client.post(endpoint: Statuses.translate(id: finalStatus.id,
|
let translation: StatusTranslation = try await client.post(endpoint: Statuses.translate(id: finalStatus.id,
|
||||||
lang: userLang))
|
lang: userLang))
|
||||||
|
Loading…
Reference in New Issue
Block a user