Take into account changes in MXKContactTableCell.

This commit is contained in:
giomfo
2015-08-17 11:35:14 +02:00
parent 3a32a9acfc
commit f8ff8441d9
@@ -269,9 +269,11 @@
[filteredParticipantCell render:filteredParticipants[index]];
// Trick, the 'add' icon is displayed here by using the matrixUserIconview which is visible for matrix contact only.
filteredParticipantCell.matrixUserIconViewHeightConstraint.constant = 30;
filteredParticipantCell.matrixUserIconView.image = [UIImage imageNamed:@"add"];
// Show 'add' icon.
filteredParticipantCell.contactAccessoryViewType = MXKContactTableCellAccessoryCustom;
filteredParticipantCell.contactAccessoryViewHeightConstraint.constant = 30;
filteredParticipantCell.contactAccessoryView.image = [UIImage imageNamed:@"add"];
filteredParticipantCell.contactAccessoryView.hidden = NO;
filteredParticipantCell.selectionStyle = UITableViewCellSelectionStyleDefault;
cell = filteredParticipantCell;
@@ -292,8 +294,8 @@
[participantCell render:contact];
// Trick, remove matrixUserIconview image to hide it.
participantCell.matrixUserIconView.image = nil;
// Hide accessory view.
participantCell.contactAccessoryViewType = MXKContactTableCellAccessoryCustom;
participantCell.selectionStyle = UITableViewCellSelectionStyleNone;
}
else
@@ -343,9 +345,11 @@
[participantCell render:contact];
}
// Trick, the 'remove' icon is displayed here by using the matrixUserIconview which is visible for matrix contact only.
participantCell.matrixUserIconViewHeightConstraint.constant = 30;
participantCell.matrixUserIconView.image = [UIImage imageNamed:@"remove"];
// Show 'remove' icon.
participantCell.contactAccessoryViewType = MXKContactTableCellAccessoryCustom;
participantCell.contactAccessoryViewHeightConstraint.constant = 30;
participantCell.contactAccessoryView.image = [UIImage imageNamed:@"remove"];
participantCell.contactAccessoryView.hidden = NO;
participantCell.selectionStyle = UITableViewCellSelectionStyleDefault;
}
}