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( .sinkUntilComplete(
receiveCompletion: { result in receiveCompletion: { result in
switch result { switch result {
case .finished: break case .finished:
self?.viewModel.showToast(
text: "banUserBanned".localized(),
backgroundColor: .backgroundSecondary
)
case .failure: case .failure:
let modal: ConfirmationModal = ConfirmationModal( self?.viewModel.showToast(
targetView: self?.view, text: "banErrorFailed".localized(),
info: ConfirmationModal.Info( backgroundColor: .backgroundSecondary
title: "error".localized(),
body: .text("context_menu_ban_user_error_alert_message".localized()),
cancelTitle: "okay".localized(),
cancelStyle: .alert_text
)
) )
self?.present(modal, animated: true)
} }
} }
) )

Loading…
Cancel
Save