mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 18:12:44 +02:00
MESSENGER-4730 personal notes visibility old style
This commit is contained in:
@@ -172,7 +172,8 @@ typedef NS_ENUM(NSUInteger, USER_INTERFACE)
|
||||
TIMELINE_USER_AVATAR_INDEX,
|
||||
TIMELINE_ENTER_ROOM_INDEX,
|
||||
USER_INTERFACE_LANGUAGE_INDEX,
|
||||
USER_INTERFACE_TIMELINE_STYLE_INDEX
|
||||
USER_INTERFACE_TIMELINE_STYLE_INDEX,
|
||||
PERSONAL_NOTES_INDEX
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TIMELINE)
|
||||
@@ -666,6 +667,9 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
|
||||
|
||||
//[sectionUserInterface addRowWithTag:USER_INTERFACE_LANGUAGE_INDEX];
|
||||
[sectionUserInterface addRowWithTag:USER_INTERFACE_THEME_INDEX];
|
||||
if (BWIBuildSettings.shared.bwiPersonalNotesVisibilityInSettings) {
|
||||
[sectionUserInterface addRowWithTag:PERSONAL_NOTES_INDEX];
|
||||
}
|
||||
sectionUserInterface = [self updateTimeLine:sectionUserInterface];
|
||||
[tmpSections addObject: sectionUserInterface];
|
||||
|
||||
@@ -2559,6 +2563,9 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
|
||||
} else if (row == USER_INTERFACE_TIMELINE_STYLE_INDEX)
|
||||
{
|
||||
cell = [self buildMessageBubblesCellForTableView:tableView atIndexPath:indexPath];
|
||||
} else if (row == PERSONAL_NOTES_INDEX)
|
||||
{
|
||||
cell = [self cellForPersonalNotesVisibility:tableView indexPath:indexPath row:row];
|
||||
} else {
|
||||
cell = [self cellForTimeline:tableView indexPath:indexPath row:row];
|
||||
}
|
||||
@@ -5408,6 +5415,24 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
|
||||
[self updateSections];
|
||||
}
|
||||
|
||||
- (UITableViewCell*) cellForPersonalNotesVisibility:(UITableView*)tableView indexPath:(NSIndexPath*)indexPath row:(NSInteger)row {
|
||||
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = [BWIL10n bwiSettingsEnableNotesRoomTitle];
|
||||
labelAndSwitchCell.mxkSwitch.on = [[[PersonalNotesSettings alloc] init] personalNotesVisible];
|
||||
labelAndSwitchCell.mxkSwitch.thumbTintColor = ThemeService.shared.theme.backgroundColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePersonalNotesVisibility:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
return labelAndSwitchCell;
|
||||
}
|
||||
|
||||
- (void) togglePersonalNotesVisibility:(UISwitch* )sender {
|
||||
PersonalNotesSettings* settings = [[PersonalNotesSettings alloc] init];
|
||||
settings.personalNotesVisible = sender.on;
|
||||
}
|
||||
|
||||
#pragma mark - ThreadsBetaCoordinatorBridgePresenterDelegate
|
||||
|
||||
- (void)threadsBetaCoordinatorBridgePresenterDelegateDidTapEnable:(ThreadsBetaCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
|
||||
Reference in New Issue
Block a user