Show loading indicator while translating status

This commit is contained in:
Shadowfacts 2023-12-15 18:36:56 -05:00
parent 180a8eb18d
commit 51f4a780e2
1 changed files with 9 additions and 1 deletions

View File

@ -546,7 +546,15 @@ class ConversationMainStatusCollectionViewCell: UICollectionViewListCell, Status
} }
@objc private func translatePressed() { @objc private func translatePressed() {
translateStatus?() guard let translateButton,
let translateStatus else {
return
}
var config = translateButton.configuration!
config.showsActivityIndicator = true
translateButton.configuration = config
// activity indicator will be hidden when translation finishes and the cell is reconfigured
translateStatus()
} }
} }