diff --git a/Riot/Modules/Contacts/Views/ContactTableViewCell.h b/Riot/Modules/Contacts/Views/ContactTableViewCell.h index 368b5386f..eadf78150 100644 --- a/Riot/Modules/Contacts/Views/ContactTableViewCell.h +++ b/Riot/Modules/Contacts/Views/ContactTableViewCell.h @@ -28,11 +28,11 @@ MXKContact *contact; } -@property (nonatomic) IBOutlet MXKImageView *thumbnailView; -@property (nonatomic) IBOutlet UIImageView *thumbnailBadgeView; -@property (nonatomic) IBOutlet UILabel *contactDisplayNameLabel; -@property (nonatomic) IBOutlet UILabel *contactInformationLabel; -@property (nonatomic) IBOutlet UIView *customAccessoryView; +@property (weak, nonatomic) IBOutlet MXKImageView *thumbnailView; +@property (weak, nonatomic) IBOutlet UILabel *contactDisplayNameLabel; +@property (weak, nonatomic) IBOutlet UILabel *powerLevelLabel; +@property (weak, nonatomic) IBOutlet UILabel *contactInformationLabel; +@property (weak, nonatomic) IBOutlet UIView *customAccessoryView; @property (weak, nonatomic) IBOutlet UIImageView *avatarBadgeImageView; @property (nonatomic) BOOL showCustomAccessoryView; diff --git a/Riot/Modules/Contacts/Views/ContactTableViewCell.m b/Riot/Modules/Contacts/Views/ContactTableViewCell.m index ae1ccc1f4..1a634e8b6 100644 --- a/Riot/Modules/Contacts/Views/ContactTableViewCell.m +++ b/Riot/Modules/Contacts/Views/ContactTableViewCell.m @@ -56,6 +56,7 @@ // apply the vector colours self.contactDisplayNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; self.contactInformationLabel.textColor = ThemeService.shared.theme.textSecondaryColor; + self.powerLevelLabel.textColor = ThemeService.shared.theme.textSecondaryColor; // Clear the default background color of a MXKImageView instance self.thumbnailView.defaultBackgroundColor = [UIColor clearColor]; @@ -134,8 +135,6 @@ mxPresenceObserver = nil; } - self.thumbnailBadgeView.hidden = YES; - // Sanity check: accept only object of MXKContact classes or sub-classes NSParameterAssert([cellData isKindOfClass:[MXKContact class]]); contact = (MXKContact*)cellData; @@ -147,6 +146,7 @@ self.thumbnailView.image = nil; self.contactDisplayNameLabel.text = nil; self.contactInformationLabel.text = nil; + self.powerLevelLabel.text = nil; return; } @@ -310,18 +310,7 @@ } - (void)refreshLocalContactInformation -{ - NSArray *identifiers = contact.matrixIdentifiers; - if (identifiers.count) - { - self.thumbnailBadgeView.image = [UIImage imageNamed:@"riot_icon"]; - self.thumbnailBadgeView.hidden = NO; - } - else - { - self.thumbnailBadgeView.hidden = YES; - } - +{ // Display the first contact method in sub label. NSString *subLabelText = nil; if (contact.emailAddresses.count) diff --git a/Riot/Modules/Contacts/Views/ContactTableViewCell.xib b/Riot/Modules/Contacts/Views/ContactTableViewCell.xib index f27b9c893..233951636 100644 --- a/Riot/Modules/Contacts/Views/ContactTableViewCell.xib +++ b/Riot/Modules/Contacts/Views/ContactTableViewCell.xib @@ -30,25 +30,23 @@ - - - - - +