WIP
This commit is contained in:
parent
de384fd4d9
commit
3ec93bb51c
|
@ -251,6 +251,8 @@ final class EditClosedGroupVC : BaseVC, UITableViewDataSource, UITableViewDelega
|
|||
guard members != Set(thread.groupModel.groupMemberIds) || name != thread.groupModel.groupName else {
|
||||
return popToConversationVC(self)
|
||||
}
|
||||
|
||||
/*
|
||||
ModalActivityIndicatorViewController.present(fromViewController: navigationController!, canCancel: false) { [weak self] _ in
|
||||
Storage.writeSync { [weak self] transaction in
|
||||
MessageSender.update(groupPublicKey, with: members, name: name, transaction: transaction).done(on: DispatchQueue.main) {
|
||||
|
@ -264,6 +266,18 @@ final class EditClosedGroupVC : BaseVC, UITableViewDataSource, UITableViewDelega
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Storage.write(with: { [weak self] transaction in
|
||||
do {
|
||||
try MessageSender.updateV2(groupPublicKey, with: members, name: name, transaction: transaction)
|
||||
} catch {
|
||||
self?.showError(title: "Couldn't Update Group", message: "Please check your internet connection and try again.")
|
||||
}
|
||||
}, completion: { [weak self] in
|
||||
guard let self = self else { return }
|
||||
popToConversationVC(self)
|
||||
})
|
||||
}
|
||||
|
||||
// MARK: Convenience
|
||||
|
|
|
@ -170,7 +170,12 @@ final class NewClosedGroupVC : BaseVC, UITableViewDataSource, UITableViewDelegat
|
|||
ModalActivityIndicatorViewController.present(fromViewController: navigationController!, canCancel: false) { [weak self] _ in
|
||||
var promise: Promise<TSGroupThread>!
|
||||
Storage.writeSync { transaction in
|
||||
promise = MessageSender.createClosedGroup(name: name, members: selectedContacts, transaction: transaction)
|
||||
|
||||
/*
|
||||
promise = MessageSender.createClosedGroup(name: name, members: selectedContacts, transaction: transaction)
|
||||
*/
|
||||
|
||||
promise = MessageSender.createV2ClosedGroup(name: name, members: selectedContacts, transaction: transaction)
|
||||
}
|
||||
let _ = promise.done(on: DispatchQueue.main) { thread in
|
||||
self?.presentingViewController?.dismiss(animated: true, completion: nil)
|
||||
|
|
Loading…
Reference in New Issue