Skip to content

Commit

Permalink
Ajout d'un label sous le bouton "Activer les notifs dans l'application"
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBuquet committed Oct 17, 2024
1 parent 49a0406 commit 3db491a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Riot/Modules/Settings/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,18 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];

labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsEnableInappNotifications;
// Tchap: add explanation to "enable notifications by email"
// labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsEnableInappNotifications;

NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString: VectorL10n.settingsEnableInappNotifications
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
NSFontAttributeName: [UIFont systemFontOfSize:17.0]}];
[attributedText appendAttributedString:[[NSAttributedString alloc] initWithString:@"\n\n" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:4]}]];
[attributedText appendAttributedString:[[NSMutableAttributedString alloc] initWithString: TchapL10n.settingsEnableInappNotificationsDescription
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textSecondaryColor,
NSFontAttributeName: [UIFont systemFontOfSize:14.0]}]];
labelAndSwitchCell.mxkLabel.attributedText = attributedText;

labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showInAppNotifications;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = account.pushNotificationServiceIsActive;
Expand All @@ -2237,7 +2248,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N



// Tchap: add explanation to "enable notiofications by email"
// Tchap: add explanation to "enable notifications by email"
// labelAndSwitchCell.mxkLabel.text = TchapL10n.settingsNotificationEmail;

NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString: TchapL10n.settingsNotificationEmail
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1103.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ajout d'un label sous le bouton "Activer les notifs dans l'application"

0 comments on commit 3db491a

Please sign in to comment.