Skip to content

Commit

Permalink
Merge pull request #872 from tchapgouv/871-fix-after-rebase-ios-1111-…
Browse files Browse the repository at this point in the history
…merged-too-quickly

Corrections après merge trop rapide du Rebase v1.11.1
  • Loading branch information
NicolasBuquet authored Sep 14, 2023
2 parents 114eb3a + bc2a9fd commit d0c9852
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Riot/Modules/Room/Settings/RoomSettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions Riot/Modules/Secrets/Reset/SecretsResetViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
44 changes: 44 additions & 0 deletions Riot/Modules/Settings/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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];
}
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions changelog.d/871.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix after Rebase iOS 1.11.1 merged too quickly

0 comments on commit d0c9852

Please sign in to comment.