GroupParticipantsViewController: support the self-sizing cells,

and the self-sizing section headers.

vector-im/riot-meta#115
This commit is contained in:
Giom Foret
2017-12-29 19:54:13 +01:00
parent 5a08fb284d
commit 2975ba7fbf
7 changed files with 81 additions and 51 deletions
+25
View File
@@ -298,6 +298,19 @@
subLabelText = phoneNumber.textNumber;
}
}
if (subLabelText.length)
{
self.contactInformationLabel.hidden = NO;
}
else
{
// Hide and fill the label with a fake string to harmonize the height of all the cells.
// This is a drawback of the self-sizing cell.
self.contactInformationLabel.hidden = YES;
subLabelText = @"No method";
}
self.contactInformationLabel.text = subLabelText;
}
@@ -327,6 +340,18 @@
{
presenceText = NSLocalizedStringFromTable(@"room_participants_offline", @"Vector", nil);
}
if (presenceText.length)
{
self.contactInformationLabel.hidden = NO;
}
else
{
// Hide and fill the label with a fake string to harmonize the height of all the cells.
// This is a drawback of the self-sizing cell.
self.contactInformationLabel.hidden = YES;
presenceText = @"No presence";
}
self.contactInformationLabel.text = presenceText;
}