From 70cf3be5fb2df4544996ebd4eed162f961677555 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Wed, 13 Sep 2023 17:19:33 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Corrections=20apr=C3=A8s=20merge=20trop=20r?= =?UTF-8?q?apide=20du=20Rebase=20v1.11.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Secrets/Reset/SecretsResetViewModel.swift | 2 + .../Modules/Settings/SettingsViewController.m | 44 +++++++++++++++++++ changelog.d/871.change | 1 + 3 files changed, 47 insertions(+) create mode 100644 changelog.d/871.change diff --git a/Riot/Modules/Secrets/Reset/SecretsResetViewModel.swift b/Riot/Modules/Secrets/Reset/SecretsResetViewModel.swift index edaa9b5ff..1711695b0 100644 --- a/Riot/Modules/Secrets/Reset/SecretsResetViewModel.swift +++ b/Riot/Modules/Secrets/Reset/SecretsResetViewModel.swift @@ -100,6 +100,8 @@ final class SecretsResetViewModel: SecretsResetViewModelType { // TODO: Tchap: Support Reauthentication (SecretsReset) // let setupCrossSigningRequest = self.crossSigningService.setupCrossSigningRequest() // self.coordinatorDelegate?.secretsResetViewModel(self, needsToAuthenticateWith: setupCrossSigningRequest) +// +// self.update(viewState: .resetting) } private func authenticationCancelled() { diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 77b315032..4a8b99d34 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -51,6 +51,8 @@ typedef NS_ENUM(NSUInteger, SECTION_TAG) // Tchap : sign out moved to end of settings // SECTION_TAG_SIGN_OUT = 0, SECTION_TAG_USER_SETTINGS = 0, +// Tchap : no account web access +// SECTION_TAG_ACCOUNT, SECTION_TAG_SENDING_MEDIA, SECTION_TAG_LINKS, SECTION_TAG_SECURITY, @@ -431,6 +433,18 @@ - (void)updateSections sectionUserSettings.headerTitle = [VectorL10n settingsUserSettings]; [tmpSections addObject:sectionUserSettings]; + + // Tchap : no account web access +// NSString *manageAccountURL = self.mainSession.homeserverWellknown.authentication.account; +// if (manageAccountURL) +// { +// Section *account = [Section sectionWithTag: SECTION_TAG_ACCOUNT]; +// [account addRowWithTag:ACCOUNT_MANAGE_INDEX]; +// account.headerTitle = [VectorL10n settingsManageAccountTitle]; +// account.footerTitle = [VectorL10n settingsManageAccountDescription:manageAccountURL]; +// [tmpSections addObject:account]; +// } + if (BuildSettings.settingsScreenShowConfirmMediaSize) { Section *sectionMedia = [Section sectionWithTag:SECTION_TAG_SENDING_MEDIA]; @@ -2764,6 +2778,18 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell = labelAndSwitchCell; } } + // Tchap : no Account web access +// else if (section == SECTION_TAG_ACCOUNT) +// { +// switch (row) +// { +// case ACCOUNT_MANAGE_INDEX: +// cell = [self getDefaultTableViewCell:tableView]; +// cell.textLabel.text = [VectorL10n settingsManageAccountAction]; +// [cell vc_setAccessoryDisclosureIndicatorWithCurrentTheme]; +// break; +// } +// } return cell; } @@ -3124,6 +3150,15 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath break; } } + // Tchap : no account web access +// else if (section == SECTION_TAG_ACCOUNT) +// { +// switch(row) { +// case ACCOUNT_MANAGE_INDEX: +// [self onManageAccountTap]; +// break; +// } +// } [tableView deselectRowAtIndexPath:indexPath animated:YES]; } @@ -4123,6 +4158,15 @@ - (void)deleteKeyExportFile } } +// Tchap : no account web access +//- (void)onManageAccountTap +//{ +// NSURL *url = [NSURL URLWithString: self.mainSession.homeserverWellknown.authentication.account]; +// if (url) { +// [UIApplication.sharedApplication openURL:url options:@{} completionHandler:nil]; +// } +//} + - (void)showThemePicker { __weak typeof(self) weakSelf = self; diff --git a/changelog.d/871.change b/changelog.d/871.change new file mode 100644 index 000000000..f17df46f1 --- /dev/null +++ b/changelog.d/871.change @@ -0,0 +1 @@ +Fix after Rebase iOS 1.11.1 merged too quickly From bc2a9fd6f10c7e1cca6e237bb26890746a1be573 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Wed, 13 Sep 2023 17:32:55 +0200 Subject: [PATCH 2/2] RoomSettings "Leave button" : comment code rather than delete code --- .../Settings/RoomSettingsViewController.m | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index be73b3ee2..60225477e 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -53,6 +53,8 @@ ROOM_SETTINGS_MAIN_SECTION_ROW_TAG, ROOM_SETTINGS_MAIN_SECTION_ROW_DIRECT_CHAT, ROOM_SETTINGS_MAIN_SECTION_ROW_MUTE_NOTIFICATIONS, + // Tchap : remove "Leave Room" button +// ROOM_SETTINGS_MAIN_SECTION_ROW_LEAVE, //Tchap: Specific rows in room settings ROOM_SETTINGS_MAIN_SECTION_ROW_ACCESS_BY_LINK, ROOM_SETTINGS_MAIN_SECTION_ROW_ACCESS_RULE @@ -525,6 +527,8 @@ - (void)updateSections } [sectionMain addRowWithTag:ROOM_SETTINGS_MAIN_SECTION_ROW_ACCESS_BY_LINK]; [sectionMain addRowWithTag:ROOM_SETTINGS_MAIN_SECTION_ROW_ACCESS_RULE]; + // Tchap : remove "Leave Room" button +// [sectionMain addRowWithTag:ROOM_SETTINGS_MAIN_SECTION_ROW_LEAVE]; [tmpSections addObject:sectionMain]; if (RiotSettings.shared.roomSettingsScreenAllowChangingAccessSettings) @@ -2412,6 +2416,23 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N } } } + // Tchap : remove "Leave Room" button +// else if (row == ROOM_SETTINGS_MAIN_SECTION_ROW_LEAVE) +// { +// MXKTableViewCellWithButton *leaveCell = [tableView dequeueReusableCellWithIdentifier:[MXKTableViewCellWithButton defaultReuseIdentifier] forIndexPath:indexPath]; +// +// NSString* title = [VectorL10n leave]; +// +// [leaveCell.mxkButton setTitle:title forState:UIControlStateNormal]; +// [leaveCell.mxkButton setTitle:title forState:UIControlStateHighlighted]; +// [leaveCell.mxkButton setTintColor:ThemeService.shared.theme.tintColor]; +// leaveCell.mxkButton.titleLabel.font = [UIFont systemFontOfSize:17]; +// +// [leaveCell.mxkButton removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside]; +// [leaveCell.mxkButton addTarget:self action:@selector(onLeave:) forControlEvents:UIControlEventTouchUpInside]; +// +// cell = leaveCell; +// } else if (section == SECTION_TAG_ACCESS) { if (row == ROOM_SETTINGS_ROOM_ACCESS_DIRECTORY_VISIBILITY)