pull/80/head
Niels Andriesse 6 years ago
parent 9d833e901a
commit e8c44937e3

@ -122,7 +122,7 @@ final class NewClosedGroupVC : UIViewController, UITableViewDataSource, UITableV
OWSProfileManager.shared().addThread(toProfileWhitelist: thread) OWSProfileManager.shared().addThread(toProfileWhitelist: thread)
ModalActivityIndicatorViewController.present(fromViewController: navigationController!, canCancel: false) { [weak self] modalActivityIndicator in ModalActivityIndicatorViewController.present(fromViewController: navigationController!, canCancel: false) { [weak self] modalActivityIndicator in
let message = TSOutgoingMessage(in: thread, groupMetaMessage: .new, expiresInSeconds: 0) let message = TSOutgoingMessage(in: thread, groupMetaMessage: .new, expiresInSeconds: 0)
message.update(withCustomMessage: NSLocalizedString("GROUP_CREATED", comment: "")) message.update(withCustomMessage: "Closed group created")
DispatchQueue.main.async { DispatchQueue.main.async {
SSKEnvironment.shared.messageSender.send(message, success: { SSKEnvironment.shared.messageSender.send(message, success: {
DispatchQueue.main.async { DispatchQueue.main.async {

@ -104,10 +104,12 @@ const int32_t kGroupIdLength = 16;
if (self == newModel) { if (self == newModel) {
return NSLocalizedString(@"GROUP_UPDATED", @""); return NSLocalizedString(@"GROUP_UPDATED", @"");
} }
if (![_groupName isEqual:newModel.groupName] && newModel.groupName.length != 0) { if (![_groupName isEqual:newModel.groupName]) {
updatedGroupInfoString = [updatedGroupInfoString if (newModel.groupName.length == 0) {
stringByAppendingString:[NSString stringWithFormat:NSLocalizedString(@"GROUP_TITLE_CHANGED", @""), updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:@"Closed group created"];
newModel.groupName]]; } else {
updatedGroupInfoString = [updatedGroupInfoString stringByAppendingString:[NSString stringWithFormat:NSLocalizedString(@"GROUP_TITLE_CHANGED", @""), newModel.groupName]];
}
} }
if (_groupImage != nil && newModel.groupImage != nil && if (_groupImage != nil && newModel.groupImage != nil &&
!([UIImagePNGRepresentation(_groupImage) isEqualToData:UIImagePNGRepresentation(newModel.groupImage)])) { !([UIImagePNGRepresentation(_groupImage) isEqualToData:UIImagePNGRepresentation(newModel.groupImage)])) {

Loading…
Cancel
Save