WIP: ban & delete toast

pull/1023/head
Ryan ZHAO 1 year ago
parent 77e9a1d29a
commit 394bd19c96

@ -2342,17 +2342,21 @@ extension ConversationVC:
receiveCompletion: { result in receiveCompletion: { result in
switch result { switch result {
case .finished: case .finished:
DispatchQueue.main.async { [weak self] in
self?.viewModel.showToast( self?.viewModel.showToast(
text: "banUserBanned".localized(), text: "banUserBanned".localized(),
backgroundColor: .backgroundSecondary backgroundColor: .backgroundSecondary
) )
}
case .failure: case .failure:
DispatchQueue.main.async { [weak self] in
self?.viewModel.showToast( self?.viewModel.showToast(
text: "banErrorFailed".localized(), text: "banErrorFailed".localized(),
backgroundColor: .backgroundSecondary backgroundColor: .backgroundSecondary
) )
} }
} }
}
) )
self?.becomeFirstResponder() self?.becomeFirstResponder()
@ -2397,17 +2401,21 @@ extension ConversationVC:
receiveCompletion: { result in receiveCompletion: { result in
switch result { switch result {
case .finished: case .finished:
DispatchQueue.main.async { [weak self] in
self?.viewModel.showToast( self?.viewModel.showToast(
text: "banUserBanned".localized(), text: "banUserBanned".localized(),
backgroundColor: .backgroundSecondary backgroundColor: .backgroundSecondary
) )
}
case .failure: case .failure:
DispatchQueue.main.async { [weak self] in
self?.viewModel.showToast( self?.viewModel.showToast(
text: "banErrorFailed".localized(), text: "banErrorFailed".localized(),
backgroundColor: .backgroundSecondary backgroundColor: .backgroundSecondary
) )
} }
} }
}
) )
self?.becomeFirstResponder() self?.becomeFirstResponder()

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save