|
@@ -402,18 +402,18 @@ extension GroupChatDetailViewController: UITableViewDelegate, UITableViewDataSou
|
|
getGroupMemberIdFor(row) != currentUser.id {
|
|
getGroupMemberIdFor(row) != currentUser.id {
|
|
// action set for members except for current user
|
|
// action set for members except for current user
|
|
let delete = UITableViewRowAction(style: .destructive, title: String.localized("remove_desktop")) { [weak self] _, indexPath in
|
|
let delete = UITableViewRowAction(style: .destructive, title: String.localized("remove_desktop")) { [weak self] _, indexPath in
|
|
- guard let strongSelf = self else { return }
|
|
|
|
- let contact = strongSelf.getGroupMember(at: row)
|
|
|
|
|
|
+ guard let self = self else { return }
|
|
|
|
+ let contact = self.getGroupMember(at: row)
|
|
let title = String.localizedStringWithFormat(String.localized("ask_remove_members"), contact.nameNAddr)
|
|
let title = String.localizedStringWithFormat(String.localized("ask_remove_members"), contact.nameNAddr)
|
|
let alert = UIAlertController(title: title, message: nil, preferredStyle: .safeActionSheet)
|
|
let alert = UIAlertController(title: title, message: nil, preferredStyle: .safeActionSheet)
|
|
alert.addAction(UIAlertAction(title: String.localized("remove_desktop"), style: .destructive, handler: { _ in
|
|
alert.addAction(UIAlertAction(title: String.localized("remove_desktop"), style: .destructive, handler: { _ in
|
|
- let success = strongSelf.dcContext.removeContactFromChat(chatId: strongSelf.chat.id, contactId: contact.id)
|
|
|
|
|
|
+ let success = self.dcContext.removeContactFromChat(chatId: self.chat.id, contactId: contact.id)
|
|
if success {
|
|
if success {
|
|
- strongSelf.removeGroupMemberFromTableAt(indexPath)
|
|
|
|
|
|
+ self.removeGroupMemberFromTableAt(indexPath)
|
|
}
|
|
}
|
|
}))
|
|
}))
|
|
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil))
|
|
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil))
|
|
- strongSelf.present(alert, animated: true, completion: nil)
|
|
|
|
|
|
+ self.present(alert, animated: true, completion: nil)
|
|
}
|
|
}
|
|
delete.backgroundColor = UIColor.red
|
|
delete.backgroundColor = UIColor.red
|
|
return [delete]
|
|
return [delete]
|