From 8af293fc10ee59db62ecb48a84a284a57938fd33 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Tue, 12 May 2020 14:22:08 +0200 Subject: [PATCH 01/27] Increment range of allowed emojis --- MatrixKit/Utils/MXKTools.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixKit/Utils/MXKTools.m b/MatrixKit/Utils/MXKTools.m index f490c2030..8183274fb 100644 --- a/MatrixKit/Utils/MXKTools.m +++ b/MatrixKit/Utils/MXKTools.m @@ -113,7 +113,7 @@ + (BOOL)isEmojiString:(NSString*)string singleEmoji:(BOOL)singleEmoji const unichar ls = [substring characterAtIndex:1]; const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000; if (0x1d000 <= uc && - uc <= 0x1f9c0) + uc <= 0x1f9ff) { isEmoji = YES; } From 20fd0116596d8184f532b171edcc44abcc2baae7 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Tue, 12 May 2020 14:25:12 +0200 Subject: [PATCH 02/27] Update CHANGES.rst --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index 82fc1311f..9fd34e9ec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,7 @@ Improvements: Bug fix: * Replace UIWebView with WKWebView (PR #663). + * Fix range of allowed surrogate emoji characters to 0x1d000-0x1f9ff. Changes in MatrixKit in 0.12.3 (2020-05-07) ========================================= From dda6965039e7a11855d69772c3167c9b03486033 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 20 May 2020 15:03:26 +0200 Subject: [PATCH 03/27] Podspec: Update DTCoreText library to 1.6.23 minimum to be sure to not reference UIWebView. --- MatrixKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixKit.podspec b/MatrixKit.podspec index e65c10277..29b7213d8 100644 --- a/MatrixKit.podspec +++ b/MatrixKit.podspec @@ -26,7 +26,7 @@ Pod::Spec.new do |s| s.dependency 'MatrixSDK', '0.16.5' s.dependency 'HPGrowingTextView', '~> 1.1' s.dependency 'libPhoneNumber-iOS', '~> 0.9.13' - s.dependency 'DTCoreText', '~> 1.6.21' + s.dependency 'DTCoreText', '~> 1.6.23' s.dependency 'cmark', '~> 0.24.1' s.default_subspec = 'Core' From 0273dd37ea7b21f7114119a081e79eb721e50fe1 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 20 May 2020 15:07:36 +0200 Subject: [PATCH 04/27] Update changes --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 2c2624541..b85bbb5a8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +Changes in MatrixKit in 0.12.7 (2020-05-xx) +========================================= + +Improvements: +* DTCoreText: Update DTCoreText dependency to 1.6.23 minimum to be sure to not reference UIWebView. + Changes in MatrixKit in 0.12.6 (2020-05-18) ========================================= From 5d69d7e38f2301296533adb06ecefbe57552ba26 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 26 May 2020 17:31:07 +0300 Subject: [PATCH 05/27] Wait for store data ready when finalizing initialization on data source, fixes vector-im/riot-ios#3159 --- MatrixKit/Models/Room/MXKRoomDataSource.m | 24 ++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index 2efbf2435..c4a5d8363 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -167,7 +167,29 @@ @implementation MXKRoomDataSource + (void)loadRoomDataSourceWithRoomId:(NSString*)roomId andMatrixSession:(MXSession*)mxSession onComplete:(void (^)(id roomDataSource))onComplete { MXKRoomDataSource *roomDataSource = [[self alloc] initWithRoomId:roomId andMatrixSession:mxSession]; - [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; + // if store is not ready, roomDataSource.room will be nil. So onComplete block will never be called. + // In order to successfully fetch the room, we should wait for store to be ready. + if (mxSession.state >= MXSessionStateStoreDataReady) + { + if (!roomDataSource.room) + { + [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; + } + } + else + { + id sessionStateObserver = nil; + sessionStateObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionStateDidChangeNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { + if (mxSession.state >= MXSessionStateStoreDataReady) + { + [[NSNotificationCenter defaultCenter] removeObserver:sessionStateObserver]; + if (!roomDataSource.room) + { + [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; + } + } + }]; + } } + (void)loadRoomDataSourceWithRoomId:(NSString*)roomId initialEventId:(NSString*)initialEventId andMatrixSession:(MXSession*)mxSession onComplete:(void (^)(id roomDataSource))onComplete From 0273d20e567a020b75c0d1f455ed9fb648b1edf4 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 26 May 2020 17:33:55 +0300 Subject: [PATCH 06/27] Update CHANGES.rst --- CHANGES.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index b85bbb5a8..6d0b86b5e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,7 +2,10 @@ Changes in MatrixKit in 0.12.7 (2020-05-xx) ========================================= Improvements: -* DTCoreText: Update DTCoreText dependency to 1.6.23 minimum to be sure to not reference UIWebView. + * DTCoreText: Update DTCoreText dependency to 1.6.23 minimum to be sure to not reference UIWebView. + +Bug fix: + * MXKRoomDataSource: Wait for store data ready when finalizing initialization on data source (PR #670). Changes in MatrixKit in 0.12.6 (2020-05-18) ========================================= From 13fa59aff49e9129d6ee4e3ce40c3b34a63e1d4b Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 26 May 2020 17:44:26 +0300 Subject: [PATCH 07/27] Update CHANGES.rst Co-authored-by: manuroe --- CHANGES.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 6d0b86b5e..d91e641a3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ Improvements: * DTCoreText: Update DTCoreText dependency to 1.6.23 minimum to be sure to not reference UIWebView. Bug fix: - * MXKRoomDataSource: Wait for store data ready when finalizing initialization on data source (PR #670). + * MXKRoomDataSource: Wait for store data ready when finalizing initialization on data source (vector-im/riot-ios/issues/3159). Changes in MatrixKit in 0.12.6 (2020-05-18) ========================================= @@ -1411,4 +1411,3 @@ MatrixKit contains the following reusable UI components: * MXKRecentListViewController * MXKRoomMemberListViewController - From 57e9793d3172fdac2b1e01e302af3f7829f9cb1d Mon Sep 17 00:00:00 2001 From: Riot Translate Bot Date: Wed, 27 May 2020 11:50:53 +0100 Subject: [PATCH 08/27] Translated using Weblate (German) (#671) Currently translated at 100.0% (349 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/de/ Co-authored-by: Fridtjof Mund Co-authored-by: Weblate --- .../Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings b/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings index 3f592a008..831bf3c86 100644 --- a/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings +++ b/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings @@ -186,14 +186,14 @@ "room_member_power_level_prompt" = "Du kannst diese Änderung nicht rückgangig machen, weil du dem Benutzer die gleiche Berechtigungsstufe gibst, die du selbst hast.\nBist du sicher?"; // Attachment "attachment_size_prompt" = "Möchtest du senden als:"; -"attachment_original" = "Aktuelle Größe: %@"; +"attachment_original" = "Originalgröße: %@"; "attachment_small" = "Klein: %@"; "attachment_medium" = "Mittel: %@"; "attachment_large" = "Groß: %@"; "attachment_cancel_download" = "Herunterladen abbrechen?"; "attachment_cancel_upload" = "Hochladen abbrechen?"; "attachment_multiselection_size_prompt" = "Bilder senden als:"; -"attachment_multiselection_original" = "Aktuelle Größe"; +"attachment_multiselection_original" = "Originalgröße"; "attachment_e2e_keys_file_prompt" = "Diese Datei enthält von einem Matrix Client exportierte Schlüssel.\nMöchtest du den Dateiinhalt sehen oder die Schlüssel importieren?"; "attachment_e2e_keys_import" = "Importiere..."; // Contacts From 3d0a37ee0b211b2c7f0afca8c3dfceff6dc7ad9e Mon Sep 17 00:00:00 2001 From: Riot Translate Bot Date: Wed, 27 May 2020 11:52:05 +0100 Subject: [PATCH 09/27] Translated using Weblate (German) (#672) Currently translated at 100.0% (349 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/de/ Co-authored-by: Fridtjof Mund Co-authored-by: Weblate From 4e28173ff4cd4b19459054852f4e0be60604869d Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 29 May 2020 09:06:07 +0200 Subject: [PATCH 10/27] MXKCountryPickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. --- .../MXKCountryPickerViewController.h | 13 +++--- .../MXKCountryPickerViewController.m | 46 +++++++++++++++---- .../MXKCountryPickerViewController.xib | 29 ++---------- 3 files changed, 50 insertions(+), 38 deletions(-) diff --git a/MatrixKit/Controllers/MXKCountryPickerViewController.h b/MatrixKit/Controllers/MXKCountryPickerViewController.h index 965eaa509..83e92f2ae 100644 --- a/MatrixKit/Controllers/MXKCountryPickerViewController.h +++ b/MatrixKit/Controllers/MXKCountryPickerViewController.h @@ -36,18 +36,19 @@ @end /** - 'MXKCountryPickerViewController' instance displays the list of supported countries. - - TODO: UISearchDisplayController is deprecated in iOS 8. MXKCountryPickerViewController must use UISearchController to manage the presentation of a search bar and display search results. + 'MXKCountryPickerViewController' instance displays the list of supported countries. */ -@interface MXKCountryPickerViewController : MXKTableViewController +@interface MXKCountryPickerViewController : MXKTableViewController -@property (weak, nonatomic) IBOutlet UISearchBar *searchBar; +/** +The searchController used to manage search. +*/ +@property (nonatomic, strong) UISearchController *searchController; /** The delegate for the view controller. */ -@property (nonatomic) id delegate; +@property (nonatomic, weak) id delegate; #pragma mark - Class methods diff --git a/MatrixKit/Controllers/MXKCountryPickerViewController.m b/MatrixKit/Controllers/MXKCountryPickerViewController.m index d0ef2da9e..f1b0e9bff 100644 --- a/MatrixKit/Controllers/MXKCountryPickerViewController.m +++ b/MatrixKit/Controllers/MXKCountryPickerViewController.m @@ -109,6 +109,17 @@ - (void)viewDidLoad } self.navigationItem.title = [NSBundle mxk_localizedStringForKey:@"country_picker_title"]; + + [self setupSearchController]; +} + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + + if (@available(iOS 11.0, *)) { + self.navigationItem.hidesSearchBarWhenScrolling = YES; + } } #pragma mark - @@ -136,6 +147,27 @@ - (void)setShowCountryCallingCode:(BOOL)showCountryCallingCode } } +#pragma mark - Private + +- (void)setupSearchController +{ + UISearchController *searchController = [[UISearchController alloc] + initWithSearchResultsController:nil]; + searchController.dimsBackgroundDuringPresentation = NO; + searchController.hidesNavigationBarDuringPresentation = NO; + searchController.searchResultsUpdater = self; + + if (@available(iOS 11.0, *)) { + self.navigationItem.searchController = searchController; + // Make the search bar visible on first view appearance + self.navigationItem.hidesSearchBarWhenScrolling = NO; + } + + self.definesPresentationContext = YES; + + self.searchController = searchController; +} + #pragma mark - UITableView dataSource - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section @@ -215,10 +247,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath } } -#pragma mark - UISearchBarDelegate +#pragma mark - UISearchResultsUpdating -- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText +- (void)updateSearchResultsForSearchController:(UISearchController *)searchController { + NSString *searchText = searchController.searchBar.text; + if (searchText.length) { searchText = [searchText lowercaseString]; @@ -261,12 +295,8 @@ - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText previousSearchPattern = nil; filteredCountryNames = nil; } -} - -- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar -{ - previousSearchPattern = nil; - filteredCountryNames = nil; + + [self.tableView reloadData]; } @end diff --git a/MatrixKit/Controllers/MXKCountryPickerViewController.xib b/MatrixKit/Controllers/MXKCountryPickerViewController.xib index 66eeb9988..a9349f0b2 100644 --- a/MatrixKit/Controllers/MXKCountryPickerViewController.xib +++ b/MatrixKit/Controllers/MXKCountryPickerViewController.xib @@ -1,17 +1,14 @@ - - - - + + - + + - - @@ -19,28 +16,12 @@ - - - - - - - - + - - - - - - - - - From b2ff05752821d27e54ff9ac4f2a190555703292f Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 29 May 2020 09:09:28 +0200 Subject: [PATCH 11/27] MXKLanguagePickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. Fix selected cell reuse issue. --- .../MXKLanguagePickerViewController.h | 11 ++-- .../MXKLanguagePickerViewController.m | 50 ++++++++++++++----- .../MXKLanguagePickerViewController.xib | 29 ++--------- 3 files changed, 48 insertions(+), 42 deletions(-) diff --git a/MatrixKit/Controllers/MXKLanguagePickerViewController.h b/MatrixKit/Controllers/MXKLanguagePickerViewController.h index 72e2d2eb5..f30cd3d79 100644 --- a/MatrixKit/Controllers/MXKLanguagePickerViewController.h +++ b/MatrixKit/Controllers/MXKLanguagePickerViewController.h @@ -36,17 +36,18 @@ /** 'MXKLanguagePickerViewController' instance displays the list of languages. For the moment, it displays only languages available in the application bundle. - - TODO: UISearchDisplayController is deprecated in iOS 8. MXKLanguagePickerViewController must use UISearchController to manage the presentation of a search bar and display search results. */ -@interface MXKLanguagePickerViewController : MXKTableViewController +@interface MXKLanguagePickerViewController : MXKTableViewController -@property (unsafe_unretained, nonatomic) IBOutlet UISearchBar *searchBar; +/** +The searchController used to manage search. +*/ +@property (nonatomic, strong) UISearchController *searchController; /** The delegate for the view controller. */ -@property (nonatomic) id delegate; +@property (nonatomic, weak) id delegate; /** The language marked in the list. diff --git a/MatrixKit/Controllers/MXKLanguagePickerViewController.m b/MatrixKit/Controllers/MXKLanguagePickerViewController.m index 6a6c55688..dcc3fc906 100644 --- a/MatrixKit/Controllers/MXKLanguagePickerViewController.m +++ b/MatrixKit/Controllers/MXKLanguagePickerViewController.m @@ -142,16 +142,40 @@ - (void)viewDidLoad // Hide search bar for the moment // TODO: Enable it once we have enough translations to fill pages and pages - [self hideSearchBar:YES]; +// [self setupSearchController]; self.navigationItem.title = [NSBundle mxk_localizedStringForKey:@"language_picker_title"]; + +} + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + + if (@available(iOS 11.0, *)) { + self.navigationItem.hidesSearchBarWhenScrolling = YES; + } } -- (void)hideSearchBar:(BOOL)hidden +#pragma mark - Private + +- (void)setupSearchController { - self.searchBar.hidden = hidden; - self.tableView.contentInset = UIEdgeInsetsMake(hidden ? -44 : 0, 0, 0 ,0); - [self.view setNeedsUpdateConstraints]; + UISearchController *searchController = [[UISearchController alloc] + initWithSearchResultsController:nil]; + searchController.dimsBackgroundDuringPresentation = NO; + searchController.hidesNavigationBarDuringPresentation = NO; + searchController.searchResultsUpdater = self; + + if (@available(iOS 11.0, *)) { + self.navigationItem.searchController = searchController; + // Make the search bar visible on first view appearance + self.navigationItem.hidesSearchBarWhenScrolling = NO; + } + + self.definesPresentationContext = YES; + + self.searchController = searchController; } #pragma mark - UITableView dataSource @@ -198,6 +222,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N { cell.accessoryType = UITableViewCellAccessoryCheckmark; } + else + { + cell.accessoryType = UITableViewCellAccessoryNone; + } } return cell; @@ -230,10 +258,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath } } -#pragma mark - UISearchBarDelegate +#pragma mark - UISearchResultsUpdating -- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText +- (void)updateSearchResultsForSearchController:(UISearchController *)searchController { + NSString *searchText = searchController.searchBar.text; + if (searchText.length) { searchText = [searchText lowercaseString]; @@ -278,10 +308,4 @@ - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText } } -- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar -{ - previousSearchPattern = nil; - filteredCellDataArray = nil; -} - @end diff --git a/MatrixKit/Controllers/MXKLanguagePickerViewController.xib b/MatrixKit/Controllers/MXKLanguagePickerViewController.xib index db0a8c637..2261ee450 100644 --- a/MatrixKit/Controllers/MXKLanguagePickerViewController.xib +++ b/MatrixKit/Controllers/MXKLanguagePickerViewController.xib @@ -1,17 +1,14 @@ - - - - + + - + + - - @@ -19,28 +16,12 @@ - - - - - - - - + - - - - - - - - - From 3d2e11211b6bed798b74518299bf7ede2d032742 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 29 May 2020 09:11:26 +0200 Subject: [PATCH 12/27] Update changes --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d91e641a3..dd3a7ae1f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,9 +3,12 @@ Changes in MatrixKit in 0.12.7 (2020-05-xx) Improvements: * DTCoreText: Update DTCoreText dependency to 1.6.23 minimum to be sure to not reference UIWebView. + * MXKCountryPickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. + * MXKLanguagePickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. Bug fix: * MXKRoomDataSource: Wait for store data ready when finalizing initialization on data source (vector-im/riot-ios/issues/3159). + * MXKLanguagePickerViewController: Fix selected cell reuse issue. Changes in MatrixKit in 0.12.6 (2020-05-18) ========================================= From c3d70989cc4b30ff2ab1b66709dfb15c74d4d527 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 29 May 2020 09:33:25 +0200 Subject: [PATCH 13/27] MXKLanguagePickerViewController: Hide search by default. --- MatrixKit/Controllers/MXKLanguagePickerViewController.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MatrixKit/Controllers/MXKLanguagePickerViewController.m b/MatrixKit/Controllers/MXKLanguagePickerViewController.m index dcc3fc906..ec2d294a3 100644 --- a/MatrixKit/Controllers/MXKLanguagePickerViewController.m +++ b/MatrixKit/Controllers/MXKLanguagePickerViewController.m @@ -140,9 +140,7 @@ - (void)viewDidLoad [[[self class] nib] instantiateWithOwner:self options:nil]; } - // Hide search bar for the moment - // TODO: Enable it once we have enough translations to fill pages and pages -// [self setupSearchController]; + [self setupSearchController]; self.navigationItem.title = [NSBundle mxk_localizedStringForKey:@"language_picker_title"]; @@ -168,7 +166,9 @@ - (void)setupSearchController searchController.searchResultsUpdater = self; if (@available(iOS 11.0, *)) { - self.navigationItem.searchController = searchController; + // Search bar is hidden for the moment, uncomment following line to enable it. + // TODO: Enable it once we have enough translations to fill pages and pages +// self.navigationItem.searchController = searchController; // Make the search bar visible on first view appearance self.navigationItem.hidesSearchBarWhenScrolling = NO; } From d288963d9bde99184144b946298764d016464664 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 2 Jun 2020 15:14:15 +0300 Subject: [PATCH 14/27] Ensure both session state and event existence when loading room data source, fixes vector-im/riot-ios#3290 --- MatrixKit/Models/Room/MXKRoomDataSource.m | 71 +++++++++++++++++------ 1 file changed, 54 insertions(+), 17 deletions(-) diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index c4a5d8363..d0e035db1 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -167,41 +167,78 @@ @implementation MXKRoomDataSource + (void)loadRoomDataSourceWithRoomId:(NSString*)roomId andMatrixSession:(MXSession*)mxSession onComplete:(void (^)(id roomDataSource))onComplete { MXKRoomDataSource *roomDataSource = [[self alloc] initWithRoomId:roomId andMatrixSession:mxSession]; + [self ensureSessionStateForDataSource:roomDataSource initialEventId:nil andMatrixSession:mxSession onComplete:onComplete]; +} + ++ (void)loadRoomDataSourceWithRoomId:(NSString*)roomId initialEventId:(NSString*)initialEventId andMatrixSession:(MXSession*)mxSession onComplete:(void (^)(id roomDataSource))onComplete +{ + MXKRoomDataSource *roomDataSource = [[self alloc] initWithRoomId:roomId initialEventId:initialEventId andMatrixSession:mxSession]; + [self ensureSessionStateForDataSource:roomDataSource initialEventId:initialEventId andMatrixSession:mxSession onComplete:onComplete]; +} + ++ (void)loadRoomDataSourceWithPeekingRoom:(MXPeekingRoom*)peekingRoom andInitialEventId:(NSString*)initialEventId onComplete:(void (^)(id roomDataSource))onComplete +{ + MXKRoomDataSource *roomDataSource = [[self alloc] initWithPeekingRoom:peekingRoom andInitialEventId:initialEventId]; + [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; +} + +/// Ensure session state to be store data ready for the roomDataSource. ++ (void)ensureSessionStateForDataSource:(MXKRoomDataSource*)roomDataSource initialEventId:(NSString*)initialEventId andMatrixSession:(MXSession*)mxSession onComplete:(void (^)(id roomDataSource))onComplete +{ // if store is not ready, roomDataSource.room will be nil. So onComplete block will never be called. // In order to successfully fetch the room, we should wait for store to be ready. if (mxSession.state >= MXSessionStateStoreDataReady) { - if (!roomDataSource.room) - { - [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; - } + [self ensureInitialEventExistenceForDataSource:roomDataSource initialEventId:initialEventId andMatrixSession:mxSession onComplete:onComplete]; } else { + // wait for session state to be store data ready id sessionStateObserver = nil; sessionStateObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionStateDidChangeNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { if (mxSession.state >= MXSessionStateStoreDataReady) { [[NSNotificationCenter defaultCenter] removeObserver:sessionStateObserver]; - if (!roomDataSource.room) - { - [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; - } + [self ensureInitialEventExistenceForDataSource:roomDataSource initialEventId:initialEventId andMatrixSession:mxSession onComplete:onComplete]; } }]; } } -+ (void)loadRoomDataSourceWithRoomId:(NSString*)roomId initialEventId:(NSString*)initialEventId andMatrixSession:(MXSession*)mxSession onComplete:(void (^)(id roomDataSource))onComplete +/// Ensure initial event existence for the roomDataSource. ++ (void)ensureInitialEventExistenceForDataSource:(MXKRoomDataSource*)roomDataSource initialEventId:(NSString*)initialEventId andMatrixSession:(MXSession*)mxSession onComplete:(void (^)(id roomDataSource))onComplete { - MXKRoomDataSource *roomDataSource = [[self alloc] initWithRoomId:roomId initialEventId:initialEventId andMatrixSession:mxSession]; - [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; -} - -+ (void)loadRoomDataSourceWithPeekingRoom:(MXPeekingRoom*)peekingRoom andInitialEventId:(NSString*)initialEventId onComplete:(void (^)(id roomDataSource))onComplete -{ - MXKRoomDataSource *roomDataSource = [[self alloc] initWithPeekingRoom:peekingRoom andInitialEventId:initialEventId]; - [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; + if (roomDataSource.room) + { + // already finalized + return; + } + + if (initialEventId == nil) + { + // if an initialEventId not provided, finalize + [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; + return; + } + + // ensure event with id 'initialEventId' exists in the session store + if ([mxSession.store eventExistsWithEventId:initialEventId inRoom:roomDataSource.roomId]) + { + [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; + } + else + { + // wait for the specific event to be existent + // use kMXSessionDidSyncNotification here instead of MXSessionStateRunning, because session does not send this state update if it's already in this state + id syncObserver = nil; + syncObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionDidSyncNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { + if ([mxSession.store eventExistsWithEventId:initialEventId inRoom:roomDataSource.roomId]) + { + [[NSNotificationCenter defaultCenter] removeObserver:syncObserver]; + [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; + } + }]; + } } + (void)finalizeRoomDataSource:(MXKRoomDataSource*)roomDataSource onComplete:(void (^)(id roomDataSource))onComplete From c19aaadbb07cc552a6535faf16146ae89194fbc5 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 2 Jun 2020 15:20:21 +0300 Subject: [PATCH 15/27] Update CHANGES.rst --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index dd3a7ae1f..afb13a1b2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,7 @@ Improvements: Bug fix: * MXKRoomDataSource: Wait for store data ready when finalizing initialization on data source (vector-im/riot-ios/issues/3159). * MXKLanguagePickerViewController: Fix selected cell reuse issue. + * MXKRoomDataSource: Wait for initial event existence if provided (vector-im/riot-ios/issues/3290). Changes in MatrixKit in 0.12.6 (2020-05-18) ========================================= From c1971a5884be0b1534f9bd7bcc9db717ee6af367 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 2 Jun 2020 19:26:57 +0300 Subject: [PATCH 16/27] Avoid endless syncs for specific event --- MatrixKit/Models/Room/MXKRoomDataSource.m | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index d0e035db1..10995dfe2 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -228,15 +228,12 @@ + (void)ensureInitialEventExistenceForDataSource:(MXKRoomDataSource*)roomDataSou } else { - // wait for the specific event to be existent + // give a chance for the specific event to be existent, for only one sync // use kMXSessionDidSyncNotification here instead of MXSessionStateRunning, because session does not send this state update if it's already in this state id syncObserver = nil; syncObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionDidSyncNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { - if ([mxSession.store eventExistsWithEventId:initialEventId inRoom:roomDataSource.roomId]) - { - [[NSNotificationCenter defaultCenter] removeObserver:syncObserver]; - [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; - } + [[NSNotificationCenter defaultCenter] removeObserver:syncObserver]; + [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; }]; } } From 01f6051ecd81f1c6e7dbc157a3f1c6a0e5bb82d0 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 4 Jun 2020 17:14:13 +0200 Subject: [PATCH 17/27] MXKAppSettings: Add an option to to hide un-decryptable events before joining the room. --- MatrixKit/Models/MXKAppSettings.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MatrixKit/Models/MXKAppSettings.h b/MatrixKit/Models/MXKAppSettings.h index be36f2613..93705d02e 100644 --- a/MatrixKit/Models/MXKAppSettings.h +++ b/MatrixKit/Models/MXKAppSettings.h @@ -96,6 +96,10 @@ */ @property (nonatomic) NSString *httpsLinkScheme; +/** + Indicate to hide un-decryptable events before joining the room. + */ +@property (nonatomic) BOOL hidePreJointUndecryptableEvents; #pragma mark - Room members From 55d5bc7788a5435d058e305ac59976b46953a661 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 4 Jun 2020 17:20:00 +0200 Subject: [PATCH 18/27] MXKRoomDataSource: Hide undecryptable messages that were sent while the user was not in the room if needed. --- MatrixKit/Models/Room/MXKRoomDataSource.m | 121 +++++++++++++++++++++- 1 file changed, 118 insertions(+), 3 deletions(-) diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index 10995dfe2..46963d127 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -160,6 +160,17 @@ Current pagination request (if any) NSString *emoteMessageSlashCommandPrefix; } +/** + Indicate to stop back-paginating when find an un-decryptable event as previous event. + It is used to hide pre join UTD events before joining the room. + */ +@property (nonatomic, assign) BOOL shouldPreventBackPaginationOnPreviousUTDEvent; + +/** + Indicate to stop back-paginating. + */ +@property (nonatomic, assign) BOOL shouldStopBackPagination; + @end @implementation MXKRoomDataSource @@ -1155,7 +1166,7 @@ - (void)paginate:(NSUInteger)numItems direction:(MXTimelineDirection)direction o return; } - if (NO == [_timeline canPaginate:direction]) + if (NO == [self canPaginate:direction]) { NSLog(@"[MXKRoomDataSource] paginate: No more events to paginate"); if (success) @@ -1287,7 +1298,7 @@ - (void)paginateToFillRect:(CGRect)rect direction:(MXTimelineDirection)direction } } } - else if (minRequestMessagesCount && [_timeline canPaginate:direction]) + else if (minRequestMessagesCount && [self canPaginate:direction]) { NSLog(@"[MXKRoomDataSource] paginateToFillRect: Prefill with data from the store"); // Give a chance to load data from the store before doing homeserver requests @@ -1305,7 +1316,7 @@ - (void)paginateToFillRect:(CGRect)rect direction:(MXTimelineDirection)direction if (bubblesTotalHeight < rect.size.height) { // No. Paginate to get more messages - if ([_timeline canPaginate:direction]) + if ([self canPaginate:direction]) { // Bound the minimal height to 44 minMessageHeight = MIN(minMessageHeight, 44); @@ -2310,6 +2321,19 @@ - (void)queueEventForProcessing:(MXEvent*)event withRoomState:(MXRoomState*)room } } + // Check for undecryptable messages that were sent while the user was not in the room and hide them + if ([MXKAppSettings standardAppSettings].hidePreJointUndecryptableEvents + && direction == MXTimelineDirectionBackwards) + { + [self checkForPreJoinUTDWithEvent:event roomState:roomState]; + + // Hide pre joint UTD events + if (self.shouldStopBackPagination) + { + return; + } + } + MXKQueuedEvent *queuedEvent = [[MXKQueuedEvent alloc] initWithEvent:event andRoomState:roomState direction:direction]; // Count queued events when the server sync is in progress @@ -2331,6 +2355,97 @@ - (void)queueEventForProcessing:(MXEvent*)event withRoomState:(MXRoomState*)room } } +- (BOOL)canPaginate:(MXTimelineDirection)direction +{ + if (![_timeline canPaginate:direction]) + { + return NO; + } + + if (direction == MXTimelineDirectionBackwards && self.shouldStopBackPagination) + { + return NO; + } + + return YES; +} + +// Check for undecryptable messages that were sent while the user was not in the room. +- (void)checkForPreJoinUTDWithEvent:(MXEvent*)event roomState:(MXRoomState*)roomState +{ + // Only check for encrypted rooms + if (!self.room.summary.isEncrypted) + { + return; + } + + // Back pagination is stopped do not check for other pre join events + if (self.shouldStopBackPagination) + { + return; + } + + // if we reach a UTD and flag is set, hide previous encrypted messages and stop back-paginating + if (event.eventType == MXEventTypeRoomEncrypted + && [event.decryptionError.domain isEqualToString:MXDecryptingErrorDomain] + && self.shouldPreventBackPaginationOnPreviousUTDEvent) + { + self.shouldStopBackPagination = YES; + return; + } + + self.shouldStopBackPagination = NO; + + if (event.eventType != MXEventTypeRoomMember) + { + return; + } + + NSString *userId = event.stateKey; + + // Only check "m.room.member" event for current user + if (![userId isEqualToString:self.mxSession.myUserId]) + { + return; + } + + BOOL shouldPreventBackPaginationOnPreviousUTDEvent = NO; + + MXRoomMember *member = [roomState.members memberWithUserId:userId]; + + if (member) + { + switch (member.membership) { + case MXMembershipJoin: + { + // if we reach a join event for the user: + // - if prev-content is invite, continue back-paginating + // - if prev-content is join (was just an avatar or displayname change), continue back-paginating + // - otherwise, set a flag and continue back-paginating + + NSString *previousMemberhsip = event.prevContent[@"membership"]; + + BOOL isPrevContentAnInvite = [previousMemberhsip isEqualToString:@"invite"]; + BOOL isPrevContentAJoin = [previousMemberhsip isEqualToString:@"join"]; + + if (!(isPrevContentAnInvite || isPrevContentAJoin)) + { + shouldPreventBackPaginationOnPreviousUTDEvent = YES; + } + } + break; + case MXMembershipInvite: + // if we reach an invite event for the user, set flag and continue back-paginating + shouldPreventBackPaginationOnPreviousUTDEvent = YES; + break; + default: + break; + } + } + + self.shouldPreventBackPaginationOnPreviousUTDEvent = shouldPreventBackPaginationOnPreviousUTDEvent; +} + - (BOOL)checkBing:(MXEvent*)event { BOOL isHighlighted = NO; From f995d01bdc63ea25c532941f73b0c99728d01a24 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 4 Jun 2020 17:24:46 +0200 Subject: [PATCH 19/27] Update changes --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index afb13a1b2..d7fe2c831 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ Improvements: * DTCoreText: Update DTCoreText dependency to 1.6.23 minimum to be sure to not reference UIWebView. * MXKCountryPickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. * MXKLanguagePickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. + * MXKAppSettings: Add an option to hide un-decryptable events before joining the room. + * MXKRoomDataSource: Hide un-decryptable messages that were sent while the user was not in the room if needed. Bug fix: * MXKRoomDataSource: Wait for store data ready when finalizing initialization on data source (vector-im/riot-ios/issues/3159). From 785fc3e9c19e4ab97ad351eb441f3548a6885fcb Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 5 Jun 2020 09:30:06 +0200 Subject: [PATCH 20/27] Update MatrixKit/Models/Room/MXKRoomDataSource.m Co-authored-by: manuroe --- MatrixKit/Models/Room/MXKRoomDataSource.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index 46963d127..d04370d19 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -161,7 +161,7 @@ Current pagination request (if any) } /** - Indicate to stop back-paginating when find an un-decryptable event as previous event. + Indicate to stop back-paginating when finding an un-decryptable event as previous event. It is used to hide pre join UTD events before joining the room. */ @property (nonatomic, assign) BOOL shouldPreventBackPaginationOnPreviousUTDEvent; From e6c172b8fe1b1cb32b528841a5afe5e44bf86597 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 5 Jun 2020 09:30:15 +0200 Subject: [PATCH 21/27] Update MatrixKit/Models/MXKAppSettings.h Co-authored-by: manuroe --- MatrixKit/Models/MXKAppSettings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixKit/Models/MXKAppSettings.h b/MatrixKit/Models/MXKAppSettings.h index 93705d02e..122a822fe 100644 --- a/MatrixKit/Models/MXKAppSettings.h +++ b/MatrixKit/Models/MXKAppSettings.h @@ -99,7 +99,7 @@ /** Indicate to hide un-decryptable events before joining the room. */ -@property (nonatomic) BOOL hidePreJointUndecryptableEvents; +@property (nonatomic) BOOL hidePreJoinedUndecryptableEvents; #pragma mark - Room members From abd55dc5669f8967e3bf7592b4326fdd180f6bb2 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 5 Jun 2020 12:46:59 +0200 Subject: [PATCH 22/27] MXKRoomDataSource: Fix typo. --- MatrixKit/Models/Room/MXKRoomDataSource.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index d04370d19..b94d4271b 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -2322,7 +2322,7 @@ - (void)queueEventForProcessing:(MXEvent*)event withRoomState:(MXRoomState*)room } // Check for undecryptable messages that were sent while the user was not in the room and hide them - if ([MXKAppSettings standardAppSettings].hidePreJointUndecryptableEvents + if ([MXKAppSettings standardAppSettings].hidePreJoinedUndecryptableEvents && direction == MXTimelineDirectionBackwards) { [self checkForPreJoinUTDWithEvent:event roomState:roomState]; From 44f3c6707256d985e5ce1aedadf29c3220b54992 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Thu, 11 Jun 2020 19:38:41 +0300 Subject: [PATCH 23/27] Convert observers to block variables to avoid releasing --- MatrixKit/Models/Room/MXKRoomDataSource.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MatrixKit/Models/Room/MXKRoomDataSource.m b/MatrixKit/Models/Room/MXKRoomDataSource.m index b94d4271b..b5acda867 100644 --- a/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -205,8 +205,7 @@ + (void)ensureSessionStateForDataSource:(MXKRoomDataSource*)roomDataSource initi else { // wait for session state to be store data ready - id sessionStateObserver = nil; - sessionStateObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionStateDidChangeNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { + __block id sessionStateObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionStateDidChangeNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { if (mxSession.state >= MXSessionStateStoreDataReady) { [[NSNotificationCenter defaultCenter] removeObserver:sessionStateObserver]; @@ -241,8 +240,7 @@ + (void)ensureInitialEventExistenceForDataSource:(MXKRoomDataSource*)roomDataSou { // give a chance for the specific event to be existent, for only one sync // use kMXSessionDidSyncNotification here instead of MXSessionStateRunning, because session does not send this state update if it's already in this state - id syncObserver = nil; - syncObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionDidSyncNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { + __block id syncObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionDidSyncNotification object:mxSession queue:nil usingBlock:^(NSNotification * _Nonnull note) { [[NSNotificationCenter defaultCenter] removeObserver:syncObserver]; [self finalizeRoomDataSource:roomDataSource onComplete:onComplete]; }]; From e610e3b089cf00135a2bf6d40e643fdd1a85d92c Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Thu, 11 Jun 2020 19:40:08 +0300 Subject: [PATCH 24/27] Update CHANGES.rst --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index 467d22e0f..d5536b4bd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,7 @@ Bug fix: * MXKRoomDataSource: Wait for store data ready when finalizing initialization on data source (vector-im/riot-ios/issues/3159). * MXKLanguagePickerViewController: Fix selected cell reuse issue. * MXKRoomDataSource: Wait for initial event existence if provided (vector-im/riot-ios/issues/3290). + * MXKRoomDataSource: Convert one-time observers to block variables to avoid releasing (vector-im/riot-ios/issues/3337). Changes in MatrixKit in 0.12.6 (2020-05-18) ========================================= From a7b3234f755f43fc5b1fb7a5471ed2356a151c1f Mon Sep 17 00:00:00 2001 From: Riot Translate Bot Date: Fri, 26 Jun 2020 17:41:52 +0100 Subject: [PATCH 25/27] Update from Weblate (#679) * Translated using Weblate (German) Currently translated at 100.0% (349 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/de/ * Translated using Weblate (Italian) Currently translated at 100.0% (349 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/it/ * Translated using Weblate (Polish) Currently translated at 41.0% (143 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/pl/ Co-authored-by: Fridtjof Mund Co-authored-by: random Co-authored-by: TR_SLimey --- .../Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings | 4 ++-- .../Assets/MatrixKitAssets.bundle/it.lproj/MatrixKit.strings | 2 +- .../Assets/MatrixKitAssets.bundle/pl.lproj/MatrixKit.strings | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings b/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings index 831bf3c86..fcb732afb 100644 --- a/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings +++ b/MatrixKit/Assets/MatrixKitAssets.bundle/de.lproj/MatrixKit.strings @@ -251,8 +251,8 @@ "notice_room_withdraw" = "%@ hat %@s Einladung zurückgezogen"; "notice_room_reason" = ". Grund: %@"; "notice_avatar_url_changed" = "%@ hat seinen Avatar geändert"; -"notice_display_name_set" = "%@ setzte seinen Anzeigenamen zu %@"; -"notice_display_name_changed_from" = "%@ änderte seinen Anzeigenamen von %@ auf %@"; +"notice_display_name_set" = "%@ setzte den Anzeigenamen auf %@"; +"notice_display_name_changed_from" = "%@ änderte den Anzeigenamen von %@ auf %@"; "notice_display_name_removed" = "%@ hat den Anzeigenamen entfernt"; "notice_topic_changed" = "%@ wechselte das Thema zu: %@"; "notice_room_name_changed" = "%@ änderte den Raum-Namen zu: %@"; diff --git a/MatrixKit/Assets/MatrixKitAssets.bundle/it.lproj/MatrixKit.strings b/MatrixKit/Assets/MatrixKitAssets.bundle/it.lproj/MatrixKit.strings index eb4eb861d..bd64c7438 100644 --- a/MatrixKit/Assets/MatrixKitAssets.bundle/it.lproj/MatrixKit.strings +++ b/MatrixKit/Assets/MatrixKitAssets.bundle/it.lproj/MatrixKit.strings @@ -194,7 +194,7 @@ "room_error_cannot_load_timeline" = "Caricamento storico dei messaggi fallito"; "room_error_timeline_event_not_found_title" = "Caricamento della posizione nello storico fallito"; "room_error_timeline_event_not_found" = "L'applicazione ha cercato di caricare un punto specifico dello storico dei messaggi in questo canale, ma non è riuscita a trovarlo"; -"room_left" = "Sei uscito dal canale"; +"room_left" = "Sei uscito dalla stanza"; "room_no_power_to_create_conference_call" = "Hai bisogno del permesso per invitare a iniziare una conferenza in questo canale"; "room_no_conference_call_in_encrypted_rooms" = "Le chiamate in conferenza non sono supportate nei canali criptati"; // Reply to message diff --git a/MatrixKit/Assets/MatrixKitAssets.bundle/pl.lproj/MatrixKit.strings b/MatrixKit/Assets/MatrixKitAssets.bundle/pl.lproj/MatrixKit.strings index 5ee7a1c6a..fd8540bfc 100644 --- a/MatrixKit/Assets/MatrixKitAssets.bundle/pl.lproj/MatrixKit.strings +++ b/MatrixKit/Assets/MatrixKitAssets.bundle/pl.lproj/MatrixKit.strings @@ -170,3 +170,4 @@ "notification_settings_suppress_from_bots" = "Ogranicz powiadomienia od botów"; "notification_settings_custom_sound" = "Dźwięk niestandardowy"; "login_home_server_info" = "Twój serwer domowy przechowuje wszystkie Twoje rozmowy i dane konta"; +"login_user_id_placeholder" = "Matrix ID (np. @bob:matrix.org or bob)"; From b94fd197f9fb390dad0c473621d6ea0b14d3fe4f Mon Sep 17 00:00:00 2001 From: Riot Translate Bot Date: Tue, 30 Jun 2020 17:24:35 +0100 Subject: [PATCH 26/27] Update from Weblate (#681) * Translated using Weblate (German) Currently translated at 100.0% (349 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/de/ * Translated using Weblate (Italian) Currently translated at 100.0% (349 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/it/ * Translated using Weblate (Polish) Currently translated at 41.0% (143 of 349 strings) Translation: Riot iOS/MatrixKit Translate-URL: https://translate.riot.im/projects/riot-ios/matrix-ios-kit/pl/ Co-authored-by: Fridtjof Mund Co-authored-by: random Co-authored-by: TR_SLimey Co-authored-by: Weblate From c92b9aa846846e2e01e49700068e1f275fa32b46 Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 30 Jun 2020 19:37:10 +0200 Subject: [PATCH 27/27] version++ --- CHANGES.rst | 1 + MatrixKit.podspec | 4 ++-- MatrixKit/Utils/MXKConstants.m | 2 +- Podfile | 2 +- Podfile.lock | 12 ++++++------ 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index d5536b4bd..4232642fc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,7 @@ Changes in MatrixKit in 0.12.7 (2020-05-xx) ========================================= Improvements: + * Upgrade MatrixSDK version ([v0.16.6](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.16.6)). * DTCoreText: Update DTCoreText dependency to 1.6.23 minimum to be sure to not reference UIWebView. * MXKCountryPickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. * MXKLanguagePickerViewController: Replace deprecated UISearchDisplayController by UISearchViewController. diff --git a/MatrixKit.podspec b/MatrixKit.podspec index 29b7213d8..8c12f466c 100644 --- a/MatrixKit.podspec +++ b/MatrixKit.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MatrixKit" - s.version = "0.12.6" + s.version = "0.12.7" s.summary = "The Matrix reusable UI library for iOS based on MatrixSDK." s.description = <<-DESC @@ -23,7 +23,7 @@ Pod::Spec.new do |s| s.swift_version = '5.0' - s.dependency 'MatrixSDK', '0.16.5' + s.dependency 'MatrixSDK', '0.16.6' s.dependency 'HPGrowingTextView', '~> 1.1' s.dependency 'libPhoneNumber-iOS', '~> 0.9.13' s.dependency 'DTCoreText', '~> 1.6.23' diff --git a/MatrixKit/Utils/MXKConstants.m b/MatrixKit/Utils/MXKConstants.m index df1b53c91..87bcc030d 100644 --- a/MatrixKit/Utils/MXKConstants.m +++ b/MatrixKit/Utils/MXKConstants.m @@ -18,7 +18,7 @@ #import "MXKConstants.h" -NSString *const MatrixKitVersion = @"0.12.6"; +NSString *const MatrixKitVersion = @"0.12.7"; NSString *const kMXKErrorNotification = @"kMXKErrorNotification"; diff --git a/Podfile b/Podfile index 0c817dfa3..4fb559d66 100644 --- a/Podfile +++ b/Podfile @@ -8,7 +8,7 @@ abstract_target 'MatrixKitSamplePods' do # Different flavours of pods to Matrix SDK # The tagged version on which this version of MatrixKit has been built - pod 'MatrixSDK', '0.16.5' + pod 'MatrixSDK', '0.16.6' # The lastest release available on the CocoaPods repository #pod 'MatrixSDK' diff --git a/Podfile.lock b/Podfile.lock index a5f8bb12a..9b2acd20b 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -39,9 +39,9 @@ PODS: - JSQSystemSoundPlayer (2.0.1) - libbase58 (0.1.4) - libPhoneNumber-iOS (0.9.15) - - MatrixSDK (0.16.5): - - MatrixSDK/Core (= 0.16.5) - - MatrixSDK/Core (0.16.5): + - MatrixSDK (0.16.6): + - MatrixSDK/Core (= 0.16.6) + - MatrixSDK/Core (0.16.6): - AFNetworking (~> 4.0.0) - GZIP (~> 1.2.2) - libbase58 (~> 0.1.4) @@ -62,7 +62,7 @@ DEPENDENCIES: - HPGrowingTextView (~> 1.1) - JSQMessagesViewController (~> 7.2.0) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixSDK (= 0.16.5) + - MatrixSDK (= 0.16.6) SPEC REPOS: trunk: @@ -91,10 +91,10 @@ SPEC CHECKSUMS: JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d libbase58: 7c040313537b8c44b6e2d15586af8e21f7354efd libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75 - MatrixSDK: efe87af67440a67781be871b07e80b1f12ef5d48 + MatrixSDK: 01b42da45d1fb28a3bceee9f3a31096bbf0a948f OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639 Realm: 4eb04d7487bd43c0581256f40b424eafb711deff -PODFILE CHECKSUM: a82870f848ff79928c09549dbbaadc1f9a3cb525 +PODFILE CHECKSUM: 65bec41248bcc90deb217e2e1f48183ff56439bc COCOAPODS: 1.9.1