WIP: add toast for banning users in communities

pull/1023/head
Ryan ZHAO 1 year ago
parent 99f80f3efc
commit 5b863c4e38

@ -2310,18 +2310,16 @@ extension ConversationVC:
.sinkUntilComplete(
receiveCompletion: { result in
switch result {
case .finished: break
case .finished:
self?.viewModel.showToast(
text: "banUserBanned".localized(),
backgroundColor: .backgroundSecondary
)
case .failure:
let modal: ConfirmationModal = ConfirmationModal(
targetView: self?.view,
info: ConfirmationModal.Info(
title: "error".localized(),
body: .text("context_menu_ban_user_error_alert_message".localized()),
cancelTitle: "okay".localized(),
cancelStyle: .alert_text
)
self?.viewModel.showToast(
text: "banErrorFailed".localized(),
backgroundColor: .backgroundSecondary
)
self?.present(modal, animated: true)
}
}
)

Loading…
Cancel
Save