forked from shadowfacts/Tusker
Show loading indicator while translating status
This commit is contained in:
parent
180a8eb18d
commit
51f4a780e2
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue