Skip to content

Commit

Permalink
Merge pull request #1106 from tchapgouv/1103-ajouter-une-explication-…
Browse files Browse the repository at this point in the history
…sous-les-notifications-de-compte

Ajout d'un label sous le bouton "Activer les notifs dans l'application"
  • Loading branch information
NicolasBuquet authored Nov 4, 2024
2 parents 49a0406 + 2b2886a commit 6bf3e98
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2792,7 +2792,7 @@ To enable access, tap Settings> Location and select Always"; // Tchap

// Settings
"settings" = "Settings";
"settings_enable_inapp_notifications" = "Enable in-app notifications";
"settings_enable_inapp_notifications" = "Enable in-app notifications for this account"; // Tchap
"settings_enable_push_notifications" = "Enable push notifications";
"settings_enter_validation_token_for" = "Enter validation token for %@:";

Expand Down
2 changes: 1 addition & 1 deletion Riot/Assets/fr.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@
"room_displayname_two_members" = "%@ et %@";
// Settings
"settings" = "Paramètres";
"settings_enable_inapp_notifications" = "Activer les notifications dans l’application";
"settings_enable_inapp_notifications" = "Activer les notifications pour ce compte"; // Tchap
"settings_enable_push_notifications" = "Activer les notifications push";
"settings_enter_validation_token_for" = "Saisir le jeton de validation pour %@ :";
"notification_settings_room_rule_title" = "Salon : « %@ »";
Expand Down
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 Tchap/Assets/Localizations/fr.lproj/Tchap.strings
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,4 @@
"settings_enable_push_notif_text" = "Sans cette autorisation, les appels entrants ne seront pas notifiés.";
"settings_enable_email_notif_text" = "Recevez un e-mail si au moins un message récent non lu pendant 72h.";
"settings_enable_email_notif_link" = "En savoir plus.";
"settings_enable_inapp_notifications_description" = "Le compte correspond à tous vos appareils connectés à Tchap.";
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 6bf3e98

Please sign in to comment.