fix outdated client banner

pull/731/head
Ryan ZHAO 7 months ago
parent c561a05273
commit 0038a78df3

@ -1522,7 +1522,17 @@ final class ConversationVC: BaseVC, SessionUtilRespondingViewController, Convers
} }
guard let outdatedMemberId: String = outdatedMemberId else { guard let outdatedMemberId: String = outdatedMemberId else {
removeOutdatedClientBanner() UIView.animate(
withDuration: 0.25,
animations: { [weak self] in
self?.outdatedClientBanner.alpha = 0
},
completion: { [weak self] _ in
self?.outdatedClientBanner.isHidden = true
self?.outdatedClientBanner.alpha = 1
self?.emptyStateLabelTopConstraint?.constant = Values.largeSpacing
}
)
return return
} }
@ -1539,17 +1549,12 @@ final class ConversationVC: BaseVC, SessionUtilRespondingViewController, Convers
} }
private func removeOutdatedClientBanner() { private func removeOutdatedClientBanner() {
UIView.animate( guard let outdatedMemberId: String = self.viewModel.threadData.outdatedMemberId else { return }
withDuration: 0.25, Storage.shared.writeAsync { db in
animations: { [weak self] in try Contact
self?.outdatedClientBanner.alpha = 0 .filter(id: outdatedMemberId)
}, .updateAll(db, Contact.Columns.lastKnownClientVersion.set(to: nil))
completion: { [weak self] _ in
self?.outdatedClientBanner.isHidden = true
self?.outdatedClientBanner.alpha = 1
self?.emptyStateLabelTopConstraint?.constant = Values.largeSpacing
} }
)
} }
func addOrRemoveBlockedBanner(threadIsBlocked: Bool) { func addOrRemoveBlockedBanner(threadIsBlocked: Bool) {

Loading…
Cancel
Save