Settings: Enhance flair handling

Display more details on the user's group (avatar, id)

vector-im/riot-meta#118
This commit is contained in:
Giom Foret
2018-02-06 23:38:12 +01:00
parent 4c8f8d7355
commit 697c227fe8
10 changed files with 250 additions and 87 deletions
@@ -2028,6 +2028,11 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
}
else if (section == ROOM_SETTINGS_RELATED_GROUPS_SECTION_INDEX)
{
if (relatedGroupsNewGroupIndex == -1)
{
// Hide this section
return nil;
}
return NSLocalizedStringFromTable(@"room_details_flair_section", @"Vector", nil);
}
else if (section == ROOM_SETTINGS_BANNED_USERS_SECTION_INDEX)
@@ -2036,11 +2041,8 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
{
return NSLocalizedStringFromTable(@"room_details_banned_users_section", @"Vector", nil);
}
else
{
// Hide this section
return nil;
}
// Hide this section
return nil;
}
else if (section == ROOM_SETTINGS_ADVANCED_SECTION_INDEX)
{
@@ -2068,6 +2070,11 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
// Hide this section
return SECTION_TITLE_PADDING_WHEN_HIDDEN;
}
else if (section == ROOM_SETTINGS_RELATED_GROUPS_SECTION_INDEX && relatedGroupsNewGroupIndex == -1)
{
// Hide this section
return SECTION_TITLE_PADDING_WHEN_HIDDEN;
}
else
{
return [super tableView:tableView heightForHeaderInSection:section];
@@ -2081,6 +2088,11 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
// Hide this section
return SECTION_TITLE_PADDING_WHEN_HIDDEN;
}
else if (section == ROOM_SETTINGS_RELATED_GROUPS_SECTION_INDEX && relatedGroupsNewGroupIndex == -1)
{
// Hide this section
return SECTION_TITLE_PADDING_WHEN_HIDDEN;
}
else
{
return [super tableView:tableView heightForFooterInSection:section];