From 0c5bbbe474d0e05829fe1825c9b204b94b06ea23 Mon Sep 17 00:00:00 2001 From: Doug Date: Tue, 6 Jul 2021 16:14:32 +0100 Subject: [PATCH 01/44] Begin removing contacts section from PeopleViewController. --- Riot/Modules/People/PeopleViewController.m | 253 ++----------------- Riot/Modules/TabBar/MasterTabBarController.h | 1 + 2 files changed, 21 insertions(+), 233 deletions(-) diff --git a/Riot/Modules/People/PeopleViewController.m b/Riot/Modules/People/PeopleViewController.m index 5985ce346..4ec4b2d92 100644 --- a/Riot/Modules/People/PeopleViewController.m +++ b/Riot/Modules/People/PeopleViewController.m @@ -14,7 +14,6 @@ limitations under the License. */ -#import #import "PeopleViewController.h" #import "UIViewController+RiotSearch.h" @@ -25,17 +24,11 @@ #import "RecentTableViewCell.h" #import "InviteRecentTableViewCell.h" -#import "ContactTableViewCell.h" - #import "Riot-Swift.h" @interface PeopleViewController () { NSInteger directRoomsSectionNumber; - - ContactsDataSource *contactsDataSource; - NSInteger contactsSectionNumber; - RecentsDataSource *recentsDataSource; } @@ -55,7 +48,6 @@ [super finalizeInit]; directRoomsSectionNumber = 0; - contactsSectionNumber = 0; self.screenName = @"People"; } @@ -92,35 +84,9 @@ // Dispose of any resources that can be recreated. } -- (void)destroy -{ - contactsDataSource.delegate = nil; - [contactsDataSource destroy]; - contactsDataSource = nil; - - [super destroy]; -} - - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - - if (BuildSettings.allowLocalContactsAccess) - { - // Check whether the access to the local contacts has not been already asked - // and check that the user has decided to use or not to use an identity server - if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusNotDetermined - || !contactsDataSource.mxSession.hasAccountDataIdentityServerValue) - { - // Allow by default the local contacts sync in order to discover matrix users. - // This setting change will trigger the loading of the local contacts, which will automatically - // ask user permission to access their local contacts. - [MXKAppSettings standardAppSettings].syncLocalContacts = YES; - } - - // Refresh the local contacts list. - [[MXKContactManager sharedManager] refreshLocalContacts]; - } [AppDelegate theDelegate].masterTabBarController.navigationItem.title = NSLocalizedStringFromTable(@"title_people", @"Vector", nil); [AppDelegate theDelegate].masterTabBarController.tabBar.tintColor = ThemeService.shared.theme.tintColor; @@ -147,17 +113,6 @@ { recentsDataSource = (RecentsDataSource*)listDataSource; } - - if (BuildSettings.allowLocalContactsAccess) - { - if (!contactsDataSource) - { - // Prepare its contacts data source - contactsDataSource = [[ContactsDataSource alloc] initWithMatrixSession:listDataSource.mxSession]; - contactsDataSource.contactCellAccessoryImage = [[UIImage imageNamed: @"disclosure_icon"] vc_tintedImageUsingColor:ThemeService.shared.theme.textSecondaryColor]; - contactsDataSource.delegate = self; - } - } } #pragma mark - MXKDataSourceDelegate @@ -185,28 +140,18 @@ directRoomsSectionNumber = [self.dataSource numberOfSectionsInTableView:self.recentsTableView]; } - // Retrieve the current number of sections related to the contacts - contactsSectionNumber = [contactsDataSource numberOfSectionsInTableView:self.recentsTableView]; - - return (directRoomsSectionNumber + contactsSectionNumber); + return directRoomsSectionNumber; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSInteger count = 0; + // FIXME: Should this still need to check the section? Where do invites come in? if (section < directRoomsSectionNumber) { count = [self.dataSource tableView:tableView numberOfRowsInSection:section]; } - else - { - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - count = [contactsDataSource tableView:tableView numberOfRowsInSection:section]; - } - } return count; } @@ -215,18 +160,11 @@ { NSInteger section = indexPath.section; + // FIXME: Should this still need to check the section? Where do invites come in? if (section < directRoomsSectionNumber) { return [self.dataSource tableView:tableView cellForRowAtIndexPath:indexPath]; } - else - { - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - return [contactsDataSource tableView:tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row inSection:section]]; - } - } // Return a fake cell to prevent app from crashing. return [[UITableViewCell alloc] init]; @@ -236,18 +174,11 @@ { NSInteger section = indexPath.section; + // FIXME: Should this still need to check the section? Where do invites come in? if (section < directRoomsSectionNumber) { return [self.dataSource tableView:tableView canEditRowAtIndexPath:indexPath]; } - else - { - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - return [contactsDataSource tableView:tableView canEditRowAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row inSection:section]]; - } - } return NO; } @@ -256,18 +187,10 @@ - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + // FIXME: Should this still need to check the section? Where do invites come in? if (section >= directRoomsSectionNumber) { - // Let the contact dataSource provide the height of the section header. - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - return [contactsDataSource heightForHeaderInSection:section]; - } - else - { - return 0.0; - } + return 0.0; } return [super tableView:tableView heightForHeaderInSection:section]; @@ -275,37 +198,10 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + // FIXME: Should this still need to check the section? Where do invites come in? if (section >= directRoomsSectionNumber) { - // Let the contact dataSource provide the section header. - CGRect frame = [tableView rectForHeaderInSection:section]; - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - UIView *sectionHeader = [contactsDataSource viewForHeaderInSection:section withFrame:frame]; - sectionHeader.tag = section + directRoomsSectionNumber; - - if (self.enableStickyHeaders) - { - while (sectionHeader.gestureRecognizers.count) - { - UIGestureRecognizer *gestureRecognizer = sectionHeader.gestureRecognizers.lastObject; - [sectionHeader removeGestureRecognizer:gestureRecognizer]; - } - - // Handle tap gesture - UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapOnSectionHeader:)]; - [tap setNumberOfTouchesRequired:1]; - [tap setNumberOfTapsRequired:1]; - [sectionHeader addGestureRecognizer:tap]; - } - - return sectionHeader; - } - else - { - return nil; - } + return nil; } return [super tableView:tableView viewForHeaderInSection:section]; @@ -314,23 +210,11 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger section = indexPath.section; + + // FIXME: Should this still need to check the section? Where do invites come in? if (section >= directRoomsSectionNumber) { - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - if ([contactsDataSource contactAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row inSection:section]]) - { - // Return the default height of the contact cell - return 74.0; - } - - return 50; - } - else - { - return 0.0; - } + return 0.0; } return [super tableView:tableView heightForRowAtIndexPath:indexPath]; @@ -339,26 +223,11 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger section = indexPath.section; + // FIXME: Should this still need to check the section? Where do invites come in? if (section >= directRoomsSectionNumber) { - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - MXKContact *mxkContact = [contactsDataSource contactAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row inSection:section]]; - - if (mxkContact) - { - [[AppDelegate theDelegate].masterTabBarController selectContact:mxkContact]; - - // Keep selected the cell by default. - return; - } - } - else - { - [tableView deselectRowAtIndexPath:indexPath animated:NO]; - return; - } + [tableView deselectRowAtIndexPath:indexPath animated:NO]; + return; } return [super tableView:tableView didSelectRowAtIndexPath:indexPath]; @@ -371,16 +240,13 @@ CGRect frame = [tableView rectForHeaderInSection:section]; frame.size.height = self.stickyHeaderHeight; + // FIXME: Should this still need to check the section? Where do invites come in? if (section >= directRoomsSectionNumber) { - // Let the contact dataSource provide this header. - section -= directRoomsSectionNumber; - if (section < contactsSectionNumber) - { - return [contactsDataSource viewForStickyHeaderInSection:section withFrame:frame]; - } + return nil; } - else if (recentsDataSource) + + if (recentsDataSource) { return [recentsDataSource viewForStickyHeaderInSection:section withFrame:frame]; } @@ -396,41 +262,7 @@ return; } - // Update here the index of the current selected cell (if any) - Useful in landscape mode with split view controller. - NSIndexPath *currentSelectedCellIndexPath = nil; - MasterTabBarController *masterTabBarController = [AppDelegate theDelegate].masterTabBarController; - if (masterTabBarController.currentContactDetailViewController) - { - // Look for the rank of this selected contact - currentSelectedCellIndexPath = [contactsDataSource cellIndexPathWithContact:masterTabBarController.selectedContact]; - - if (currentSelectedCellIndexPath) - { - // Select the right row - currentSelectedCellIndexPath = [NSIndexPath indexPathForRow:currentSelectedCellIndexPath.row inSection:(directRoomsSectionNumber + currentSelectedCellIndexPath.section)]; - [self.recentsTableView selectRowAtIndexPath:currentSelectedCellIndexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; - - if (forceVisible) - { - // Scroll table view to make the selected row appear at second position - NSInteger topCellIndexPathRow = currentSelectedCellIndexPath.row ? currentSelectedCellIndexPath.row - 1: currentSelectedCellIndexPath.row; - NSIndexPath* indexPath = [NSIndexPath indexPathForRow:topCellIndexPathRow inSection:currentSelectedCellIndexPath.section]; - [self.recentsTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO]; - } - } - else - { - NSIndexPath *indexPath = [self.recentsTableView indexPathForSelectedRow]; - if (indexPath) - { - [self.recentsTableView deselectRowAtIndexPath:indexPath animated:NO]; - } - } - } - else - { - [super refreshCurrentSelectedCell:forceVisible]; - } + [super refreshCurrentSelectedCell:forceVisible]; } - (void)onPlusButtonPressed @@ -449,24 +281,6 @@ } } -#pragma mark - UISearchBarDelegate - -- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText -{ - // Apply filter on contact source - [contactsDataSource searchWithPattern:searchText forceReset:NO]; - - [super searchBar:searchBar textDidChange:searchText]; -} - -- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar -{ - // Reset filtering - [contactsDataSource searchWithPattern:nil forceReset:NO]; - - [super searchBarCancelButtonClicked:searchBar]; -} - #pragma mark - Empty view management - (void)updateEmptyView @@ -504,34 +318,7 @@ { return recentsDataSource.invitesCellDataArray.count + recentsDataSource.conversationCellDataArray.count - + recentsDataSource.peopleCellDataArray.count - + [self numberOfContactsInContactsDataSource]; -} - -- (NSUInteger)numberOfContactsInContactsDataSource -{ - BOOL areLocalContactsAccessAuthorized = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusAuthorized; - - NSInteger nbOfItemsInContactDataSource = 0; - - for (NSInteger i = 0; i < contactsSectionNumber; i++) - { - nbOfItemsInContactDataSource += [contactsDataSource tableView:self.recentsTableView numberOfRowsInSection:i]; - } - - NSInteger numberOfContactsInContactsDataSource; - - // No local contacts to show and no search in directory - if (!areLocalContactsAccessAuthorized && contactsSectionNumber == 1 && nbOfItemsInContactDataSource <= 1) - { - numberOfContactsInContactsDataSource = 0; - } - else - { - numberOfContactsInContactsDataSource = nbOfItemsInContactDataSource; - } - - return numberOfContactsInContactsDataSource; + + recentsDataSource.peopleCellDataArray.count; } @end diff --git a/Riot/Modules/TabBar/MasterTabBarController.h b/Riot/Modules/TabBar/MasterTabBarController.h index 6ef661948..b558fc110 100644 --- a/Riot/Modules/TabBar/MasterTabBarController.h +++ b/Riot/Modules/TabBar/MasterTabBarController.h @@ -172,6 +172,7 @@ @property (nonatomic, readonly) MXKRoomDataSource *selectedRoomDataSource; @property (nonatomic, readonly) RoomPreviewData *selectedRoomPreviewData; +// TODO: Check if this is needed anymore as the New Chat dialog is model // References on the currently selected contact and its view controller @property (nonatomic, readonly) ContactDetailsViewController *currentContactDetailViewController; @property (nonatomic, readonly) MXKContact *selectedContact; From b5526e4496a9da4a5188f8f8d638afcde90fbb47 Mon Sep 17 00:00:00 2001 From: Doug Date: Tue, 6 Jul 2021 16:37:11 +0100 Subject: [PATCH 02/44] Remove check. --- Riot/Modules/TabBar/MasterTabBarController.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Riot/Modules/TabBar/MasterTabBarController.h b/Riot/Modules/TabBar/MasterTabBarController.h index b558fc110..6ef661948 100644 --- a/Riot/Modules/TabBar/MasterTabBarController.h +++ b/Riot/Modules/TabBar/MasterTabBarController.h @@ -172,7 +172,6 @@ @property (nonatomic, readonly) MXKRoomDataSource *selectedRoomDataSource; @property (nonatomic, readonly) RoomPreviewData *selectedRoomPreviewData; -// TODO: Check if this is needed anymore as the New Chat dialog is model // References on the currently selected contact and its view controller @property (nonatomic, readonly) ContactDetailsViewController *currentContactDetailViewController; @property (nonatomic, readonly) MXKContact *selectedContact; From b9b63ff03e280bbadd01ac69c9429fe0c614abba Mon Sep 17 00:00:00 2001 From: Doug Date: Tue, 6 Jul 2021 17:43:16 +0100 Subject: [PATCH 03/44] Tidy up PeopleViewController data source methods. --- Riot/Modules/People/PeopleViewController.m | 62 +++++++++------------- 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/Riot/Modules/People/PeopleViewController.m b/Riot/Modules/People/PeopleViewController.m index 4ec4b2d92..79cbf86e7 100644 --- a/Riot/Modules/People/PeopleViewController.m +++ b/Riot/Modules/People/PeopleViewController.m @@ -145,49 +145,43 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - NSInteger count = 0; - - // FIXME: Should this still need to check the section? Where do invites come in? - if (section < directRoomsSectionNumber) + // FIXME: Should this need to check the section? + if (section >= directRoomsSectionNumber) { - count = [self.dataSource tableView:tableView numberOfRowsInSection:section]; + return 0; } - return count; + return [self.dataSource tableView:tableView numberOfRowsInSection:section]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - NSInteger section = indexPath.section; - - // FIXME: Should this still need to check the section? Where do invites come in? - if (section < directRoomsSectionNumber) + // FIXME: Should this need to check the section? + if (indexPath.section >= directRoomsSectionNumber) { - return [self.dataSource tableView:tableView cellForRowAtIndexPath:indexPath]; + // Return a fake cell to prevent app from crashing. + return [[UITableViewCell alloc] init]; } - // Return a fake cell to prevent app from crashing. - return [[UITableViewCell alloc] init]; + return [self.dataSource tableView:tableView cellForRowAtIndexPath:indexPath]; } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - NSInteger section = indexPath.section; - - // FIXME: Should this still need to check the section? Where do invites come in? - if (section < directRoomsSectionNumber) + // FIXME: Should this need to check the section? + if (indexPath.section >= directRoomsSectionNumber) { - return [self.dataSource tableView:tableView canEditRowAtIndexPath:indexPath]; + return NO; } - return NO; + return [self.dataSource tableView:tableView canEditRowAtIndexPath:indexPath]; } #pragma mark - UITableView delegate - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - // FIXME: Should this still need to check the section? Where do invites come in? + // FIXME: Should this need to check the section? if (section >= directRoomsSectionNumber) { return 0.0; @@ -198,7 +192,7 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - // FIXME: Should this still need to check the section? Where do invites come in? + // FIXME: Should this need to check the section? if (section >= directRoomsSectionNumber) { return nil; @@ -209,10 +203,8 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - NSInteger section = indexPath.section; - - // FIXME: Should this still need to check the section? Where do invites come in? - if (section >= directRoomsSectionNumber) + // FIXME: Should this need to check the section? + if (indexPath.section >= directRoomsSectionNumber) { return 0.0; } @@ -222,9 +214,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - NSInteger section = indexPath.section; - // FIXME: Should this still need to check the section? Where do invites come in? - if (section >= directRoomsSectionNumber) + // FIXME: Should this need to check the section? + if (indexPath.section >= directRoomsSectionNumber) { [tableView deselectRowAtIndexPath:indexPath animated:NO]; return; @@ -237,21 +228,16 @@ - (UIView *)tableView:(UITableView *)tableView viewForStickyHeaderInSection:(NSInteger)section { - CGRect frame = [tableView rectForHeaderInSection:section]; - frame.size.height = self.stickyHeaderHeight; - - // FIXME: Should this still need to check the section? Where do invites come in? - if (section >= directRoomsSectionNumber) + // FIXME: Should this need to check the section? + if (section >= directRoomsSectionNumber || recentsDataSource == nil) { return nil; } - if (recentsDataSource) - { - return [recentsDataSource viewForStickyHeaderInSection:section withFrame:frame]; - } + CGRect frame = [tableView rectForHeaderInSection:section]; + frame.size.height = self.stickyHeaderHeight; - return nil; + return [recentsDataSource viewForStickyHeaderInSection:section withFrame:frame]; } - (void)refreshCurrentSelectedCell:(BOOL)forceVisible From 6cb2574879e4e6bb58254850384f4ed04b183999 Mon Sep 17 00:00:00 2001 From: Doug Date: Fri, 9 Jul 2021 14:22:33 +0100 Subject: [PATCH 04/44] Remove headers from PeopleViewController. --- Riot/Modules/People/PeopleViewController.m | 32 ++-------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/Riot/Modules/People/PeopleViewController.m b/Riot/Modules/People/PeopleViewController.m index 79cbf86e7..e2e839d99 100644 --- a/Riot/Modules/People/PeopleViewController.m +++ b/Riot/Modules/People/PeopleViewController.m @@ -74,8 +74,6 @@ // Change the table data source. It must be the people view controller itself. self.recentsTableView.dataSource = self; - - self.enableStickyHeaders = YES; } - (void)didReceiveMemoryWarning @@ -181,24 +179,12 @@ - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - // FIXME: Should this need to check the section? - if (section >= directRoomsSectionNumber) - { - return 0.0; - } - - return [super tableView:tableView heightForHeaderInSection:section]; + return 0.0; } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - // FIXME: Should this need to check the section? - if (section >= directRoomsSectionNumber) - { - return nil; - } - - return [super tableView:tableView viewForHeaderInSection:section]; + return nil; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath @@ -226,20 +212,6 @@ #pragma mark - Override RecentsViewController -- (UIView *)tableView:(UITableView *)tableView viewForStickyHeaderInSection:(NSInteger)section -{ - // FIXME: Should this need to check the section? - if (section >= directRoomsSectionNumber || recentsDataSource == nil) - { - return nil; - } - - CGRect frame = [tableView rectForHeaderInSection:section]; - frame.size.height = self.stickyHeaderHeight; - - return [recentsDataSource viewForStickyHeaderInSection:section withFrame:frame]; -} - - (void)refreshCurrentSelectedCell:(BOOL)forceVisible { // Check whether the recents data source is correctly configured. From 73dedc211fdf5ee9ee1d6e21211f1fc8907805ac Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 23 Jul 2021 10:42:08 +0200 Subject: [PATCH 05/44] RecentsDataSource: Factorize section reset management and do not make it in refreshRoomsSection method. --- .../Recents/DataSources/RecentsDataSource.m | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m index 0e2f14ea3..123d9da69 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m @@ -71,17 +71,9 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou processingQueue = dispatch_queue_create("RecentsDataSource", DISPATCH_QUEUE_SERIAL); _crossSigningBannerDisplay = CrossSigningBannerDisplayNone; - crossSigningBannerSection = -1; - _secureBackupBannerDisplay = SecureBackupBannerDisplayNone; - secureBackupBannerSection = -1; - directorySection = -1; - invitesSection = -1; - favoritesSection = -1; - peopleSection = -1; - conversationSection = -1; - lowPrioritySection = -1; - serverNoticeSection = -1; + + [self resetSectionIndexes]; _areSectionsShrinkable = NO; shrinkedSectionsBitMask = 0; @@ -96,6 +88,19 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou return self; } +- (void)resetSectionIndexes +{ + crossSigningBannerSection = -1; + secureBackupBannerSection = -1; + directorySection = -1; + invitesSection = -1; + favoritesSection = -1; + peopleSection = -1; + conversationSection = -1; + lowPrioritySection = -1; + serverNoticeSection = -1; +} + #pragma mark - Properties @@ -445,7 +450,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou // Check whether all data sources are ready before rendering recents if (self.state == MXKDataSourceStateReady) { - crossSigningBannerSection = secureBackupBannerSection = directorySection = favoritesSection = peopleSection = conversationSection = lowPrioritySection = invitesSection = serverNoticeSection = -1; + [self resetSectionIndexes]; if (self.crossSigningBannerDisplay != CrossSigningBannerDisplayNone) { @@ -1119,10 +1124,8 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou #pragma mark - MXKDataSourceDelegate -- (void)refreshRoomsSection:(void (^)(void))onComplete; +- (void)refreshRoomsSection:(void (^)(void))onComplete { - secureBackupBannerSection = directorySection = favoritesSection = peopleSection = conversationSection = lowPrioritySection = serverNoticeSection = invitesSection = -1; - if (displayedRecentsDataSourceArray.count > 0) { // FIXME manage multi accounts From 8b03bb671f907030beda214c442dd63693b2e73b Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 23 Jul 2021 10:43:58 +0200 Subject: [PATCH 06/44] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index 49dae406a..7001f1822 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ Changes to be released in next version 🙌 Improvements * Room: Added support for Voice Messages (#4090, #4091, #4092, #4094, #4095, #4096) * Remove the directory section from the Rooms tab. + * RecentsDataSource: Factorize section reset in one place. 🐛 Bugfix * Room: Fixed mentioning users from room info member details (#4583) From 34727fb122a06ac05426bddfa9080281b8a4c8a7 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 23 Jul 2021 14:29:27 +0200 Subject: [PATCH 07/44] Update changes --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7001f1822..81bdbedb3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,7 @@ Changes to be released in next version 🙌 Improvements * Room: Added support for Voice Messages (#4090, #4091, #4092, #4094, #4095, #4096) * Remove the directory section from the Rooms tab. - * RecentsDataSource: Factorize section reset in one place. + * RecentsDataSource: Factorize section reset in one place (target #4591). 🐛 Bugfix * Room: Fixed mentioning users from room info member details (#4583) From 07eec9bfb6befdcd4c77598a69df3b2593a48732 Mon Sep 17 00:00:00 2001 From: Doug Date: Fri, 23 Jul 2021 14:08:51 +0100 Subject: [PATCH 08/44] Configure identity server keyboard for safer URL entry. --- ...ngsIdentityServerViewController.storyboard | 19 ++++++++----------- ...SettingsIdentityServerViewController.swift | 1 - 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Riot/Modules/Settings/IdentityServer/SettingsIdentityServerViewController.storyboard b/Riot/Modules/Settings/IdentityServer/SettingsIdentityServerViewController.storyboard index ab35e9993..b33325642 100644 --- a/Riot/Modules/Settings/IdentityServer/SettingsIdentityServerViewController.storyboard +++ b/Riot/Modules/Settings/IdentityServer/SettingsIdentityServerViewController.storyboard @@ -1,11 +1,9 @@ - - - - + + - + @@ -19,7 +17,7 @@ - + @@ -38,9 +36,8 @@ - - + @@ -63,7 +60,7 @@ -