WIP: add toast for banning users in communities

pull/1023/head
Ryan ZHAO 2 years ago
parent 5c9140cb4c
commit b2540dca9f

@ -2364,18 +2364,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