diff --git a/Signal/src/Storyboard/Storyboard.storyboard b/Signal/src/Storyboard/Storyboard.storyboard
index e96bc26b4..b9f071878 100755
--- a/Signal/src/Storyboard/Storyboard.storyboard
+++ b/Signal/src/Storyboard/Storyboard.storyboard
@@ -822,6 +822,9 @@ A0 09 9A FF A8 8A 09 99
+
+
+
@@ -2557,7 +2560,7 @@ A0 09 9A FF A8 8A 09 99
-
+
@@ -3877,5 +3880,6 @@ Licensed under the GPLv3
+
diff --git a/Signal/src/view controllers/NewGroupViewController.m b/Signal/src/view controllers/NewGroupViewController.m
index 3bfd5613c..5ad1ae841 100644
--- a/Signal/src/view controllers/NewGroupViewController.m
+++ b/Signal/src/view controllers/NewGroupViewController.m
@@ -263,6 +263,7 @@ static NSString* const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue"
} else {
cell.textLabel.text = @"Add People:";
cell.textLabel.textColor = [UIColor lightGrayColor];
+ cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
@@ -274,14 +275,18 @@ static NSString* const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue"
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
- cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ if(indexPath.row>0) {
+ cell.accessoryType = UITableViewCellAccessoryCheckmark;
+ }
}
-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
- cell.accessoryType = UITableViewCellAccessoryNone;
+ if(indexPath.row>0) {
+ cell.accessoryType = UITableViewCellAccessoryNone;
+ }
}
#pragma mark - Text Field Delegate
diff --git a/Signal/src/view controllers/ShowGroupMembersViewController.h b/Signal/src/view controllers/ShowGroupMembersViewController.h
index 406af5af0..6fc3213ab 100644
--- a/Signal/src/view controllers/ShowGroupMembersViewController.h
+++ b/Signal/src/view controllers/ShowGroupMembersViewController.h
@@ -10,9 +10,8 @@
#import "TSGroupThread.h"
#import "GroupModel.h"
-@interface ShowGroupMembersViewController : UIViewController
+@interface ShowGroupMembersViewController : UITableViewController
- (void)configWithThread:(TSGroupThread*)thread;
-@property(nonatomic, strong) IBOutlet UITableView* tableView;
@end
diff --git a/Signal/src/view controllers/ShowGroupMembersViewController.m b/Signal/src/view controllers/ShowGroupMembersViewController.m
index 92a4b6da7..f44f3b827 100644
--- a/Signal/src/view controllers/ShowGroupMembersViewController.m
+++ b/Signal/src/view controllers/ShowGroupMembersViewController.m
@@ -8,6 +8,7 @@
#import "ShowGroupMembersViewController.h"
#import "SignalsViewController.h"
+#import "ContactDetailTableViewController.h"
#import "Contact.h"
#import "ContactsManager.h"
#import "Environment.h"
@@ -102,14 +103,14 @@ static NSString* const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue"
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier: indexPath.row == 0 ? @"HeaderCell" : @"GroupSearchCell"];
}
if (indexPath.row > 0) {
- NSUInteger row = (NSUInteger)indexPath.row;
- Contact* contact = contacts[row-1];
+ Contact* contact = [self contactForIndexPath:indexPath];
cell.textLabel.attributedText = [self attributedStringForContact:contact inCell:cell];
} else {
cell.textLabel.text = @"Group conversation Recipients:";
cell.textLabel.textColor = [UIColor lightGrayColor];
+ cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
@@ -118,6 +119,35 @@ static NSString* const kUnwindToMessagesViewSegue = @"UnwindToMessagesViewSegue"
}
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ if(indexPath.row>0) {
+ [self performSegueWithIdentifier:@"DetailSegue" sender:self];
+ [tableView deselectRowAtIndexPath:indexPath animated:YES];
+ }
+}
+
+-(Contact*)contactForIndexPath:(NSIndexPath*)indexPath
+{
+ Contact *contact = contacts[(NSUInteger)(indexPath.row-1)];
+ return contact;
+}
+
+
+#pragma mark - Segue
+
+-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
+{
+ if ([segue.identifier isEqualToString:@"DetailSegue"]) {
+ ContactDetailTableViewController * detailvc = [segue destinationViewController];
+ NSIndexPath * indexPath = [self.tableView indexPathForSelectedRow]; // this is nil
+ Contact *contact = [self contactForIndexPath:indexPath];
+ detailvc.contact = contact;
+ }
+}
+
+
+
#pragma mark - Cell Utility
- (NSAttributedString *)attributedStringForContact:(Contact *)contact inCell:(UITableViewCell*)cell {