Indicate loading when DeepL button is used (#1272)

This commit is contained in:
Paul Schuetz 2023-03-18 14:08:48 +01:00 committed by GitHub
parent 7d8516474c
commit e72abeebc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -310,6 +310,10 @@ public class StatusRowViewModel: ObservableObject {
}
func translateWithDeepL(userLang: String) async {
withAnimation {
isLoadingTranslation = true
}
let deepLClient = getDeepLClient()
let translation = try? await deepLClient.request(target: userLang,
text: finalStatus.content.asRawText)