mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Use only latest profiles in the timeline (labs)
This commit is contained in:
committed by
aringenbach
parent
d9a6c4d8f2
commit
a6ed656107
@@ -159,7 +159,8 @@ typedef NS_ENUM(NSUInteger, LABS_ENABLE)
|
||||
{
|
||||
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0,
|
||||
LABS_ENABLE_THREADS_INDEX,
|
||||
LABS_ENABLE_MESSAGE_BUBBLES_INDEX
|
||||
LABS_ENABLE_MESSAGE_BUBBLES_INDEX,
|
||||
LABS_USE_ONLY_LATEST_PROFILES_INDEX
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, SECURITY)
|
||||
@@ -572,6 +573,7 @@ TableViewSectionsDelegate>
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_THREADS_INDEX];
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_MESSAGE_BUBBLES_INDEX];
|
||||
[sectionLabs addRowWithTag:LABS_USE_ONLY_LATEST_PROFILES_INDEX];
|
||||
sectionLabs.headerTitle = [VectorL10n settingsLabs];
|
||||
if (sectionLabs.hasAnyRows)
|
||||
{
|
||||
@@ -2462,6 +2464,18 @@ TableViewSectionsDelegate>
|
||||
{
|
||||
cell = [self buildMessageBubblesCellForTableView:tableView atIndexPath:indexPath];
|
||||
}
|
||||
else if (row == LABS_USE_ONLY_LATEST_PROFILES_INDEX)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsLabsUseOnlyLatestProfiles;
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenUseOnlyLatestProfiles;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleUseOnlyLatestProfiles:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_FLAIR)
|
||||
{
|
||||
@@ -3244,6 +3258,11 @@ TableViewSectionsDelegate>
|
||||
}
|
||||
}
|
||||
|
||||
- (void)toggleUseOnlyLatestProfiles:(UISwitch *)sender
|
||||
{
|
||||
RiotSettings.shared.roomScreenUseOnlyLatestProfiles = sender.isOn;
|
||||
}
|
||||
|
||||
- (void)markAllAsRead:(id)sender
|
||||
{
|
||||
// Feedback: disable button and run activity indicator
|
||||
|
||||
Reference in New Issue
Block a user