From 1c2df753da8ddaacc582c5dfed2a70b2ab284820 Mon Sep 17 00:00:00 2001 From: fridtjof <2780577+fridtjof@users.noreply.github.com> Date: Mon, 4 Feb 2019 21:15:47 +0100 Subject: [PATCH 01/73] take care of percent encoding related deprecations --- Riot/AppDelegate.m | 11 +++++++---- Riot/Managers/Widgets/Widget.m | 10 ++++++---- Riot/Modules/Common/Recents/RecentsViewController.m | 3 ++- .../Communities/Home/GroupHomeViewController.m | 5 +++-- .../Integrations/IntegrationManagerViewController.m | 8 ++++---- Riot/Modules/Room/RoomViewController.m | 11 +++++++---- 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index 7f67cc7b0..e04646bdc 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -1910,8 +1910,11 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN { // Retry opening the link but with the returned room id NSString *newUniversalLinkFragment = - [fragment stringByReplacingOccurrencesOfString:[roomIdOrAlias stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] - withString:[roomId stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + [fragment stringByReplacingOccurrencesOfString:[roomIdOrAlias + stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLFragmentAllowedCharacterSet] + withString:[roomId + stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLFragmentAllowedCharacterSet] + ]; universalLinkFragmentPendingRoomAlias = @{roomId: roomIdOrAlias}; @@ -2143,7 +2146,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN NSMutableArray *pathParams2 = [NSMutableArray arrayWithArray:pathParams]; for (NSInteger i = 0; i < pathParams.count; i++) { - pathParams2[i] = [pathParams2[i] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + pathParams2[i] = [pathParams2[i] stringByRemovingPercentEncoding]; } pathParams = pathParams2; @@ -2163,7 +2166,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN if (value.length) { value = [value stringByReplacingOccurrencesOfString:@"+" withString:@" "]; - value = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + value = [value stringByRemovingPercentEncoding]; queryParams[key] = value; } diff --git a/Riot/Managers/Widgets/Widget.m b/Riot/Managers/Widgets/Widget.m index 0ac7714af..69ebb0dc9 100644 --- a/Riot/Managers/Widgets/Widget.m +++ b/Riot/Managers/Widgets/Widget.m @@ -61,9 +61,10 @@ NSString *avatarUrl = self.mxSession.myUser.avatarUrl ? self.mxSession.myUser.avatarUrl : @""; // Escape everything to build a valid URL string - userId = [userId stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - displayName = [displayName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - avatarUrl = [avatarUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + // We can't know where the values escaped here will be inserted in the URL, so the alphanumeric charset is used + userId = [userId stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; + displayName = [displayName stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; + avatarUrl = [avatarUrl stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; NSString *widgetUrl = _url; widgetUrl = [widgetUrl stringByReplacingOccurrencesOfString:@"$matrix_user_id" withString:userId]; @@ -86,7 +87,8 @@ if (dataString) { - NSString *value = [dataString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + // same question as above + NSString *value = [dataString stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; widgetUrl = [widgetUrl stringByReplacingOccurrencesOfString:paramKey withString:value]; diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index fa95b06f2..a2c212e01 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -1251,7 +1251,8 @@ if (roomIdOrAlias.length) { // Open the room or preview it - NSString *fragment = [NSString stringWithFormat:@"/room/%@", [roomIdOrAlias stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + NSString *fragment = [NSString stringWithFormat:@"/room/%@", + [roomIdOrAlias stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } [tableView deselectRowAtIndexPath:indexPath animated:NO]; diff --git a/Riot/Modules/Communities/Home/GroupHomeViewController.m b/Riot/Modules/Communities/Home/GroupHomeViewController.m index b488c7102..fba947f08 100644 --- a/Riot/Modules/Communities/Home/GroupHomeViewController.m +++ b/Riot/Modules/Communities/Home/GroupHomeViewController.m @@ -779,7 +779,7 @@ // When a link refers to a room alias/id, a user id or an event id, the non-ASCII characters (like '#' in room alias) has been escaped // to be able to convert it into a legal URL string. - NSString *absoluteURLString = [URL.absoluteString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + NSString *absoluteURLString = [URL.absoluteString stringByRemovingPercentEncoding]; // If the link can be open it by the app, let it do if ([Tools isUniversalLink:URL]) @@ -869,7 +869,8 @@ shouldInteractWithURL = NO; // Open the group or preview it - NSString *fragment = [NSString stringWithFormat:@"/group/%@", [absoluteURLString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + NSString *fragment = [NSString stringWithFormat:@"/group/%@", + [absoluteURLString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } diff --git a/Riot/Modules/Integrations/IntegrationManagerViewController.m b/Riot/Modules/Integrations/IntegrationManagerViewController.m index 99897bf7b..ea664e505 100644 --- a/Riot/Modules/Integrations/IntegrationManagerViewController.m +++ b/Riot/Modules/Integrations/IntegrationManagerViewController.m @@ -104,20 +104,20 @@ NSString *const kIntegrationManagerAddIntegrationScreen = @"add_integ"; { url = [NSMutableString stringWithFormat:@"%@?scalar_token=%@&room_id=%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"integrationsUiUrl"], - [scalarToken stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], - [roomId stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] + [scalarToken stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]], + [roomId stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]] ]; if (screen) { [url appendString:@"&screen="]; - [url appendString:[screen stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + [url appendString:[screen stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]; } if (widgetId) { [url appendString:@"&integ_id="]; - [url appendString:[widgetId stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + [url appendString:[widgetId stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]; } } diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 88c18349e..4a2814adf 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -2756,7 +2756,7 @@ // When a link refers to a room alias/id, a user id or an event id, the non-ASCII characters (like '#' in room alias) has been escaped // to be able to convert it into a legal URL string. - NSString *absoluteURLString = [url.absoluteString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + NSString *absoluteURLString = [url.absoluteString stringByRemovingPercentEncoding]; // If the link can be open it by the app, let it do if ([Tools isUniversalLink:url]) @@ -2805,7 +2805,8 @@ NSString *roomIdOrAlias = absoluteURLString; // Open the room or preview it - NSString *fragment = [NSString stringWithFormat:@"/room/%@", [roomIdOrAlias stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + NSString *fragment = [NSString stringWithFormat:@"/room/%@", + [roomIdOrAlias stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } // Preview the clicked group @@ -2814,7 +2815,8 @@ shouldDoAction = NO; // Open the group or preview it - NSString *fragment = [NSString stringWithFormat:@"/group/%@", [absoluteURLString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + NSString *fragment = [NSString stringWithFormat:@"/group/%@", + [absoluteURLString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } else if ([absoluteURLString hasPrefix:kEventFormatterOnReRequestKeysLinkAction]) @@ -3961,7 +3963,8 @@ else if (customizedRoomDataSource.roomState.isObsolete) { NSString *replacementRoomId = customizedRoomDataSource.roomState.tombStoneContent.replacementRoomId; - NSString *roomLinkFragment = [NSString stringWithFormat:@"/room/%@", [replacementRoomId stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; + NSString *roomLinkFragment = [NSString stringWithFormat:@"/room/%@", + [replacementRoomId stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; [roomActivitiesView displayRoomReplacementWithRoomLinkTappedHandler:^{ [[AppDelegate theDelegate] handleUniversalLinkFragment:roomLinkFragment]; From 245de393e2f7d6e5c2e872365e0ae56a5353991c Mon Sep 17 00:00:00 2001 From: fridtjof <2780577+fridtjof@users.noreply.github.com> Date: Tue, 5 Feb 2019 01:36:13 +0100 Subject: [PATCH 02/73] replace contact availability checks with the iOS 9+ way --- Riot/AppDelegate.m | 3 ++- Riot/Modules/Contacts/ContactsTableViewController.m | 3 ++- Riot/Modules/Contacts/DataSources/ContactsDataSource.m | 9 +++++---- Riot/Modules/People/PeopleViewController.m | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index 7f67cc7b0..d6aee61ce 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -20,6 +20,7 @@ #import #import +#import #import "RecentsDataSource.h" #import "RoomDataSource.h" @@ -3342,7 +3343,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN - (void)refreshLocalContacts { // Check whether the application is allowed to access the local contacts. - if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusAuthorized) { // Check the user permission for syncing local contacts. This permission was handled independently on previous application version. if (![MXKAppSettings standardAppSettings].syncLocalContacts) diff --git a/Riot/Modules/Contacts/ContactsTableViewController.m b/Riot/Modules/Contacts/ContactsTableViewController.m index 558813569..a20ccc945 100644 --- a/Riot/Modules/Contacts/ContactsTableViewController.m +++ b/Riot/Modules/Contacts/ContactsTableViewController.m @@ -15,6 +15,7 @@ limitations under the License. */ +#import #import "ContactsTableViewController.h" #import "UIViewController+RiotSearch.h" @@ -148,7 +149,7 @@ [[Analytics sharedInstance] trackScreen:_screenName]; // Check whether the access to the local contacts has not been already asked. - if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusNotDetermined) { // 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 diff --git a/Riot/Modules/Contacts/DataSources/ContactsDataSource.m b/Riot/Modules/Contacts/DataSources/ContactsDataSource.m index c77685d09..ff9303167 100644 --- a/Riot/Modules/Contacts/DataSources/ContactsDataSource.m +++ b/Riot/Modules/Contacts/DataSources/ContactsDataSource.m @@ -14,6 +14,7 @@ limitations under the License. */ +#import #import "ContactsDataSource.h" #import "ContactTableViewCell.h" @@ -87,7 +88,7 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onContactManagerDidUpdate:) name:kMXKContactManagerDidUpdateLocalContactMatrixIDsNotification object:nil]; // Refresh the matrix identifiers for all the local contacts. - if (ABAddressBookGetAuthorizationStatus() != kABAuthorizationStatusNotDetermined) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusAuthorized) { // Refresh the matrix identifiers for all the local contacts. [[MXKContactManager sharedManager] updateMatrixIDsForAllLocalContacts]; @@ -618,14 +619,14 @@ tableViewCell.textLabel.numberOfLines = 0; // Indicate to the user why there is no contacts - switch (ABAddressBookGetAuthorizationStatus()) + switch ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts]) { - case kABAuthorizationStatusAuthorized: + case CNAuthorizationStatusAuthorized: // Because there is no contacts on the device tableViewCell.textLabel.text = NSLocalizedStringFromTable(@"contacts_address_book_no_contact", @"Vector", nil); break; - case kABAuthorizationStatusNotDetermined: + case CNAuthorizationStatusNotDetermined: // Because the user have not granted the permission yet // (The permission request popup is displayed at the same time) tableViewCell.textLabel.text = NSLocalizedStringFromTable(@"contacts_address_book_permission_required", @"Vector", nil); diff --git a/Riot/Modules/People/PeopleViewController.m b/Riot/Modules/People/PeopleViewController.m index 84ec480a7..6d2d88e36 100644 --- a/Riot/Modules/People/PeopleViewController.m +++ b/Riot/Modules/People/PeopleViewController.m @@ -14,6 +14,7 @@ limitations under the License. */ +#import #import "PeopleViewController.h" #import "UIViewController+RiotSearch.h" @@ -99,7 +100,7 @@ [super viewWillAppear:animated]; // Check whether the access to the local contacts has not been already asked. - if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusNotDetermined) { // 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 From b1aa2872a556cf7ead551b9b873b1e86ae0da200 Mon Sep 17 00:00:00 2001 From: fridtjof <2780577+fridtjof@users.noreply.github.com> Date: Tue, 5 Feb 2019 01:38:50 +0100 Subject: [PATCH 03/73] update CHANGES.rst --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index 68d3c8604..126c66646 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,7 @@ Improvements: * Key backup: Add a dedicated section to settings (#2193). * Key backup: Implement setup reminder (#2211). * Key backup: Implement recover reminder (#2206). + * Update deprecated contact availability checks (#2222). Bug fix: * Use white scroll bar on dark themes (#2158). From edc4963277c4f3aff7196cda66f8c85b88835027 Mon Sep 17 00:00:00 2001 From: Marco Festini Date: Thu, 22 Nov 2018 15:31:49 +0100 Subject: [PATCH 04/73] Remove Pusher App Ids Signed-off-by: Marco Festini --- Riot/Assets/Riot-Defaults.plist | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Riot/Assets/Riot-Defaults.plist b/Riot/Assets/Riot-Defaults.plist index ef435a321..9c18e135d 100644 --- a/Riot/Assets/Riot-Defaults.plist +++ b/Riot/Assets/Riot-Defaults.plist @@ -8,10 +8,6 @@ pushGatewayURL https://matrix.org/_matrix/push/v1/notify - pusherAppIdDev - im.vector.app.ios.dev - pusherAppIdProd - im.vector.app.ios.prod pushKitAppIdProd im.vector.app.ios.voip.prod identityserverurl From 2e995278f769594c9b4d0171079c700fac5d322a Mon Sep 17 00:00:00 2001 From: fridtjof <2780577+fridtjof@users.noreply.github.com> Date: Mon, 18 Feb 2019 15:31:55 +0100 Subject: [PATCH 05/73] use the Matrix SDK's method for percent encoding --- Riot/AppDelegate.m | 6 ++---- Riot/Managers/Widgets/Widget.m | 8 ++++---- Riot/Modules/Common/Recents/RecentsViewController.m | 3 +-- Riot/Modules/Communities/Home/GroupHomeViewController.m | 2 +- .../Integrations/IntegrationManagerViewController.m | 8 ++++---- Riot/Modules/Room/RoomViewController.m | 9 +++------ 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index e04646bdc..9bf2c1b3e 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -1910,10 +1910,8 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN { // Retry opening the link but with the returned room id NSString *newUniversalLinkFragment = - [fragment stringByReplacingOccurrencesOfString:[roomIdOrAlias - stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLFragmentAllowedCharacterSet] - withString:[roomId - stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLFragmentAllowedCharacterSet] + [fragment stringByReplacingOccurrencesOfString:[MXTools encodeURIComponent:roomIdOrAlias] + withString:[MXTools encodeURIComponent:roomId] ]; universalLinkFragmentPendingRoomAlias = @{roomId: roomIdOrAlias}; diff --git a/Riot/Managers/Widgets/Widget.m b/Riot/Managers/Widgets/Widget.m index 69ebb0dc9..3831d9a02 100644 --- a/Riot/Managers/Widgets/Widget.m +++ b/Riot/Managers/Widgets/Widget.m @@ -62,9 +62,9 @@ // Escape everything to build a valid URL string // We can't know where the values escaped here will be inserted in the URL, so the alphanumeric charset is used - userId = [userId stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; - displayName = [displayName stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; - avatarUrl = [avatarUrl stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; + userId = [MXTools encodeURIComponent:userId]; + displayName = [MXTools encodeURIComponent:displayName]; + avatarUrl = [MXTools encodeURIComponent:avatarUrl]; NSString *widgetUrl = _url; widgetUrl = [widgetUrl stringByReplacingOccurrencesOfString:@"$matrix_user_id" withString:userId]; @@ -88,7 +88,7 @@ if (dataString) { // same question as above - NSString *value = [dataString stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.alphanumericCharacterSet]; + NSString *value = [MXTools encodeURIComponent:dataString]; widgetUrl = [widgetUrl stringByReplacingOccurrencesOfString:paramKey withString:value]; diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index a2c212e01..ecaabb3fc 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -1251,8 +1251,7 @@ if (roomIdOrAlias.length) { // Open the room or preview it - NSString *fragment = [NSString stringWithFormat:@"/room/%@", - [roomIdOrAlias stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]]; + NSString *fragment = [NSString stringWithFormat:@"/room/%@", [MXTools encodeURIComponent:roomIdOrAlias]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } [tableView deselectRowAtIndexPath:indexPath animated:NO]; diff --git a/Riot/Modules/Communities/Home/GroupHomeViewController.m b/Riot/Modules/Communities/Home/GroupHomeViewController.m index fba947f08..ea6ccb7cd 100644 --- a/Riot/Modules/Communities/Home/GroupHomeViewController.m +++ b/Riot/Modules/Communities/Home/GroupHomeViewController.m @@ -870,7 +870,7 @@ // Open the group or preview it NSString *fragment = [NSString stringWithFormat:@"/group/%@", - [absoluteURLString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; + [MXTools encodeURIComponent:absoluteURLString]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } diff --git a/Riot/Modules/Integrations/IntegrationManagerViewController.m b/Riot/Modules/Integrations/IntegrationManagerViewController.m index ea664e505..b8dd28448 100644 --- a/Riot/Modules/Integrations/IntegrationManagerViewController.m +++ b/Riot/Modules/Integrations/IntegrationManagerViewController.m @@ -104,20 +104,20 @@ NSString *const kIntegrationManagerAddIntegrationScreen = @"add_integ"; { url = [NSMutableString stringWithFormat:@"%@?scalar_token=%@&room_id=%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"integrationsUiUrl"], - [scalarToken stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]], - [roomId stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]] + [MXTools encodeURIComponent:scalarToken], + [MXTools encodeURIComponent:roomId] ]; if (screen) { [url appendString:@"&screen="]; - [url appendString:[screen stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]; + [url appendString:[MXTools encodeURIComponent:screen]]; } if (widgetId) { [url appendString:@"&integ_id="]; - [url appendString:[widgetId stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]; + [url appendString:[MXTools encodeURIComponent:widgetId]]; } } diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 4a2814adf..8531084df 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -2805,8 +2805,7 @@ NSString *roomIdOrAlias = absoluteURLString; // Open the room or preview it - NSString *fragment = [NSString stringWithFormat:@"/room/%@", - [roomIdOrAlias stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; + NSString *fragment = [NSString stringWithFormat:@"/room/%@", [MXTools encodeURIComponent:roomIdOrAlias]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } // Preview the clicked group @@ -2815,8 +2814,7 @@ shouldDoAction = NO; // Open the group or preview it - NSString *fragment = [NSString stringWithFormat:@"/group/%@", - [absoluteURLString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; + NSString *fragment = [NSString stringWithFormat:@"/group/%@", [MXTools encodeURIComponent:absoluteURLString]]; [[AppDelegate theDelegate] handleUniversalLinkFragment:fragment]; } else if ([absoluteURLString hasPrefix:kEventFormatterOnReRequestKeysLinkAction]) @@ -3963,8 +3961,7 @@ else if (customizedRoomDataSource.roomState.isObsolete) { NSString *replacementRoomId = customizedRoomDataSource.roomState.tombStoneContent.replacementRoomId; - NSString *roomLinkFragment = [NSString stringWithFormat:@"/room/%@", - [replacementRoomId stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]]]; + NSString *roomLinkFragment = [NSString stringWithFormat:@"/room/%@", [MXTools encodeURIComponent:replacementRoomId]]; [roomActivitiesView displayRoomReplacementWithRoomLinkTappedHandler:^{ [[AppDelegate theDelegate] handleUniversalLinkFragment:roomLinkFragment]; From 4a79e24b1336aa0075d5cdc527ba9e6aa2a8d022 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 20 Feb 2019 07:30:34 +0000 Subject: [PATCH 06/73] Translated using Weblate (Bulgarian) Currently translated at 100.0% (614 of 614 strings) Translation: Riot iOS/Riot iOS Translate-URL: https://translate.riot.im/projects/riot-ios/riot-ios/bg/ --- Riot/Assets/bg.lproj/Vector.strings | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Riot/Assets/bg.lproj/Vector.strings b/Riot/Assets/bg.lproj/Vector.strings index ff0b78f1f..2089e1a91 100644 --- a/Riot/Assets/bg.lproj/Vector.strings +++ b/Riot/Assets/bg.lproj/Vector.strings @@ -649,3 +649,22 @@ "key_backup_setup_success_from_recovery_key_make_copy_action" = "Направи копие"; "key_backup_setup_success_from_recovery_key_made_copy_action" = "Направих копие"; "key_backup_recover_invalid_passphrase_title" = "Неправилна парола за възстановяване"; +"key_backup_recover_invalid_passphrase" = "Резервното копие не можа да бъде разшифровано с тази парола: потвърдете, че сте въвели правилната парола."; +"key_backup_recover_invalid_recovery_key_title" = "Несъответствие в ключа за възстановяване"; +"key_backup_recover_invalid_recovery_key" = "Резервното копие не можа да бъде разшифровано с този ключ: потвърдете, че сте въвели правилния ключ."; +"key_backup_setup_banner_title" = "Никога не губете шифровани съобщения"; +"key_backup_setup_banner_subtitle" = "Започни използването на резервни копия на ключовете"; +"key_backup_recover_banner_title" = "Никога не губете шифровани съобщения"; +"key_backup_recover_banner_subtitle" = "Използвай резервни копия на ключовете"; +"sign_out_existing_key_backup_alert_title" = "Сигурни ли сте, че искате да излезете?"; +"sign_out_existing_key_backup_alert_sign_out_action" = "Изход"; +"sign_out_non_existing_key_backup_alert_title" = "Ако излезете, ще загубите достъп до шифрованите съобщения"; +"sign_out_non_existing_key_backup_alert_setup_key_backup_action" = "Започни използването на резервни копия на ключовете"; +"sign_out_non_existing_key_backup_alert_discard_key_backup_action" = "Не ми трябват шифрованите съобщения"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_title" = "Ще загубите шифрованите съобщения"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_message" = "Ще загубите достъп до шифрованите съобщения, освен ако не направите резервно копие на ключовете преди да излезете."; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_sign_out_action" = "Изход"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_backup_action" = "Резервно копие"; +"sign_out_key_backup_in_progress_alert_title" = "В момента се прави резервно копие. Ако излезете сега, ще загубите достъп до шифрованите съобщения."; +"sign_out_key_backup_in_progress_alert_discard_key_backup_action" = "Не ми трябват шифрованите съобщения"; +"sign_out_key_backup_in_progress_alert_cancel_action" = "Ще почакам"; From 2ead5f0e8984e4ad4db0a478fa15a4784d46cd07 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 20 Feb 2019 14:54:24 +0100 Subject: [PATCH 07/73] Fix split view controller status bar style when is not collapsed. Fix #2276. --- Riot/Modules/Main/RiotSplitViewController.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Riot/Modules/Main/RiotSplitViewController.m b/Riot/Modules/Main/RiotSplitViewController.m index fb3459d81..1452eeaa5 100644 --- a/Riot/Modules/Main/RiotSplitViewController.m +++ b/Riot/Modules/Main/RiotSplitViewController.m @@ -15,6 +15,8 @@ */ #import "RiotSplitViewController.h" +#import "ThemeService.h" +#import "Riot-Swift.h" @implementation RiotSplitViewController @@ -36,8 +38,8 @@ } } - // Keep the default UISplitViewController style. - return [super preferredStatusBarStyle]; + // Use theme status bar style + return ThemeService.shared.theme.statusBarStyle; } - (BOOL)prefersStatusBarHidden From 6c0fc9bd8dfd482f5be314a0ed722d16bb46c85f Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 20 Feb 2019 15:22:53 +0100 Subject: [PATCH 08/73] Update changes --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index f756255ec..b1afaabd7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +Changes in 0.8.2 (2019-xx-xx) +=============================================== + +Bug fix: +* Reskin: status bar text is no more readable on iPad (#2276). + Changes in 0.8.1 (2019-02-19) =============================================== From 1b7798cb1999e4bb9c5b50f2c8ce332a37d5d93f Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 20 Feb 2019 16:43:45 +0100 Subject: [PATCH 09/73] Maintenance: Update cocopoads and pods. --- CHANGES.rst | 6 +++++- Podfile | 2 +- Podfile.lock | 18 +++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index b1afaabd7..cfa2d2659 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,8 +1,12 @@ Changes in 0.8.2 (2019-xx-xx) =============================================== +Improvements: + * Upgrade MatrixKit version ([v0.9.6](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.9.6). + * Maintenance: Update cocopoads and pods. + Bug fix: -* Reskin: status bar text is no more readable on iPad (#2276). + * Reskin: status bar text is no more readable on iPad (#2276). Changes in 0.8.1 (2019-02-19) =============================================== diff --git a/Podfile b/Podfile index 92626d5a9..796298a32 100644 --- a/Podfile +++ b/Podfile @@ -79,7 +79,7 @@ abstract_target 'RiotPods' do pod 'zxcvbn-ios' # Tools - pod 'SwiftGen', '~> 6.0' + pod 'SwiftGen', '~> 6.1' target "Riot" do import_MatrixKit diff --git a/Podfile.lock b/Podfile.lock index 8a56627bb..38c19fed1 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -71,7 +71,7 @@ PODS: - GZIP (~> 1.2.2) - libbase58 (~> 0.1.4) - OLMKit (~> 3.0.0) - - Realm (~> 3.11.1) + - Realm (~> 3.13.1) - MatrixSDK/JingleCallStack (0.12.2): - MatrixSDK/Core - WebRTC (= 63.11.20455) @@ -85,15 +85,15 @@ PODS: - PiwikTracker (4.4.2): - PiwikTracker/Core (= 4.4.2) - PiwikTracker/Core (4.4.2) - - Realm (3.11.2): - - Realm/Headers (= 3.11.2) - - Realm/Headers (3.11.2) + - Realm (3.13.1): + - Realm/Headers (= 3.13.1) + - Realm/Headers (3.13.1) - Reusable (4.0.5): - Reusable/Storyboard (= 4.0.5) - Reusable/View (= 4.0.5) - Reusable/Storyboard (4.0.5) - Reusable/View (4.0.5) - - SwiftGen (6.0.2) + - SwiftGen (6.1.0) - WebRTC (63.11.20455) - zxcvbn-ios (1.0.4) @@ -155,12 +155,12 @@ SPEC CHECKSUMS: MatrixSDK: 60a9472eacdf51e5110b8bc7beba844debf992ef OLMKit: 88eda69110489f817d59bcb4353b7c247570aa4f PiwikTracker: 42862c7b13028065c3dfd36b4dc38db8a5765acf - Realm: 864477d028db77f7c5a0cba64a4892ad53db128a + Realm: 50071da38fe079e0735e47c9f2eae738c68c5996 Reusable: 188be1a54ac0691bc66e5bb24ec6eb91971b315b - SwiftGen: e5b047067aa84082826a0c4f1c4c2ddc95bcf74c + SwiftGen: f872ca75cbd17bf7103c17f13dcfa0d9a15667b0 WebRTC: f2a6203584745fe53532633397557876b5d71640 zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c -PODFILE CHECKSUM: e4a36bd00d4da77d377d00e5df6044e3ccce3b4c +PODFILE CHECKSUM: 17a74795e75026048d90793d2ebb0880eac5c55f -COCOAPODS: 1.6.0.beta.2 +COCOAPODS: 1.6.0 From 443aea27f989e1302283a38a45b0f7d117b78501 Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 20 Feb 2019 16:45:32 +0100 Subject: [PATCH 10/73] Maintenance: Update cocopoads and pods. Automatic update to Swift4.2 --- CHANGES.rst | 2 +- Riot.xcodeproj/project.pbxproj | 11 ++++++----- Riot/Categories/UIControl.swift | 2 +- Riot/Categories/UIViewController.swift | 8 ++++---- Riot/Generated/Images.swift | 2 +- Riot/Generated/RiotDefaults.swift | 5 ++--- Riot/Generated/Storyboards.swift | 2 +- Riot/Managers/Theme/Theme.swift | 2 +- Riot/Managers/Theme/Themes/DarkTheme.swift | 4 ++-- Riot/Managers/Theme/Themes/DefaultTheme.swift | 4 ++-- .../Common/KeyboardAvoiding/KeyboardAvoider.swift | 10 +++++----- .../KeyboardAvoiding/KeyboardNotification.swift | 12 ++++++------ 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cfa2d2659..57dc9ae60 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,7 +3,7 @@ Changes in 0.8.2 (2019-xx-xx) Improvements: * Upgrade MatrixKit version ([v0.9.6](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.9.6). - * Maintenance: Update cocopoads and pods. + * Maintenance: Update cocopoads and pods. Automatic update to Swift4.2 Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index 6ed5783ba..6b4418e00 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -3013,6 +3013,7 @@ 24CBEC4D1F0EAD310093EABB = { CreatedOnToolsVersion = 8.3.2; DevelopmentTeam = 7J4U792NQT; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { @@ -3033,7 +3034,7 @@ F094A9A11B78D8F000B1FBBF = { CreatedOnToolsVersion = 6.2; DevelopmentTeam = 7J4U792NQT; - LastSwiftMigration = 0940; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { @@ -3805,7 +3806,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -3839,7 +3840,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotShareExtension-Bridging-Header.h"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -4035,7 +4036,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -4075,7 +4076,7 @@ PRODUCT_BUNDLE_IDENTIFIER = im.vector.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Riot/Categories/UIControl.swift b/Riot/Categories/UIControl.swift index a6323581a..0706d4c96 100644 --- a/Riot/Categories/UIControl.swift +++ b/Riot/Categories/UIControl.swift @@ -31,7 +31,7 @@ class ClosureSleeve { } extension UIControl { - func vc_addAction(for controlEvents: UIControlEvents = .primaryActionTriggered, action: @escaping () -> ()) { + func vc_addAction(for controlEvents: UIControl.Event = .primaryActionTriggered, action: @escaping () -> ()) { let sleeve = ClosureSleeve(attachTo: self, closure: action) addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents) } diff --git a/Riot/Categories/UIViewController.swift b/Riot/Categories/UIViewController.swift index 2b0e16155..e3aee9ad3 100644 --- a/Riot/Categories/UIViewController.swift +++ b/Riot/Categories/UIViewController.swift @@ -39,11 +39,11 @@ extension UIViewController { /// - viewController: The child view controller to add. /// - view: The view on which to add the child view controller view. func vc_addChildViewController(viewController: UIViewController, onView view: UIView) { - self.addChildViewController(viewController) + self.addChild(viewController) viewController.view.frame = view.bounds view.vc_addSubViewMatchingParent(viewController.view) - viewController.didMove(toParentViewController: self) + viewController.didMove(toParent: self) } @@ -51,9 +51,9 @@ extension UIViewController { /// /// - Parameter viewController: The child view controller to remove. func vc_removeChildViewController(viewController: UIViewController) { - viewController.willMove(toParentViewController: nil) + viewController.willMove(toParent: nil) viewController.view.removeFromSuperview() - viewController.removeFromParentViewController() + viewController.removeFromParent() } diff --git a/Riot/Generated/Images.swift b/Riot/Generated/Images.swift index 78ad0f5a7..486035dc0 100644 --- a/Riot/Generated/Images.swift +++ b/Riot/Generated/Images.swift @@ -1,5 +1,5 @@ // swiftlint:disable all -// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen #if os(OSX) import AppKit.NSImage diff --git a/Riot/Generated/RiotDefaults.swift b/Riot/Generated/RiotDefaults.swift index 66279954e..5c063181b 100644 --- a/Riot/Generated/RiotDefaults.swift +++ b/Riot/Generated/RiotDefaults.swift @@ -1,4 +1,5 @@ -// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen +// swiftlint:disable all +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen import Foundation @@ -30,8 +31,6 @@ internal enum RiotDefaults { internal static let presenceColorForUnavailableUser: Int = _document["presenceColorForUnavailableUser"] internal static let pushGatewayURL: String = _document["pushGatewayURL"] internal static let pushKitAppIdProd: String = _document["pushKitAppIdProd"] - internal static let pusherAppIdDev: String = _document["pusherAppIdDev"] - internal static let pusherAppIdProd: String = _document["pusherAppIdProd"] internal static let roomDirectoryServers: [String: Any] = _document["roomDirectoryServers"] internal static let showAllEventsInRoomHistory: Bool = _document["showAllEventsInRoomHistory"] internal static let showLeftMembersInRoomMemberList: Bool = _document["showLeftMembersInRoomMemberList"] diff --git a/Riot/Generated/Storyboards.swift b/Riot/Generated/Storyboards.swift index 7b3025f9f..afafd57f1 100644 --- a/Riot/Generated/Storyboards.swift +++ b/Riot/Generated/Storyboards.swift @@ -1,5 +1,5 @@ // swiftlint:disable all -// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen // swiftlint:disable sorted_imports import Foundation diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 50970fed0..241c9924c 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -58,7 +58,7 @@ import UIKit /// Status bar style to use var statusBarStyle: UIStatusBarStyle { get } - var scrollBarStyle: UIScrollViewIndicatorStyle { get } + var scrollBarStyle: UIScrollView.IndicatorStyle { get } var keyboardAppearance : UIKeyboardAppearance { get } diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index 8e50e1b7b..4d08afb07 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -53,7 +53,7 @@ class DarkTheme: NSObject, Theme { UIColor(rgb: 0xAC3BA8)] var statusBarStyle: UIStatusBarStyle = .lightContent - var scrollBarStyle: UIScrollViewIndicatorStyle = .white + var scrollBarStyle: UIScrollView.IndicatorStyle = .white var keyboardAppearance: UIKeyboardAppearance = .dark var placeholderTextColor: UIColor = UIColor(white: 1.0, alpha: 0.3) @@ -70,7 +70,7 @@ class DarkTheme: NSObject, Theme { func applyStyle(onNavigationBar navigationBar: UINavigationBar) { navigationBar.tintColor = self.baseTextPrimaryColor; navigationBar.titleTextAttributes = [ - NSAttributedStringKey.foregroundColor: self.baseTextPrimaryColor + NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor ] navigationBar.barTintColor = self.baseColor; diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index fb43f1fec..7690e6685 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -53,7 +53,7 @@ class DefaultTheme: NSObject, Theme { UIColor(rgb: 0xAC3BA8)] var statusBarStyle: UIStatusBarStyle = .lightContent - var scrollBarStyle: UIScrollViewIndicatorStyle = .default + var scrollBarStyle: UIScrollView.IndicatorStyle = .default var keyboardAppearance: UIKeyboardAppearance = .light var placeholderTextColor: UIColor = UIColor(white: 0.7, alpha: 1.0) // Use default 70% gray color @@ -70,7 +70,7 @@ class DefaultTheme: NSObject, Theme { func applyStyle(onNavigationBar navigationBar: UINavigationBar) { navigationBar.tintColor = self.baseTextPrimaryColor; navigationBar.titleTextAttributes = [ - NSAttributedStringKey.foregroundColor: self.baseTextPrimaryColor + NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor ] navigationBar.barTintColor = self.baseColor; diff --git a/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift b/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift index aa23f7efc..3413dabd6 100644 --- a/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift +++ b/Riot/Modules/Common/KeyboardAvoiding/KeyboardAvoider.swift @@ -23,7 +23,7 @@ final class KeyboardAvoider { private enum KeyboardAnimation { static let defaultDuration: TimeInterval = 0.25 - static let defaultAnimationCurveRawValue: Int = UIViewAnimationCurve.easeInOut.rawValue + static let defaultAnimationCurveRawValue: Int = UIView.AnimationCurve.easeInOut.rawValue } // MARK: - Properties @@ -61,18 +61,18 @@ final class KeyboardAvoider { notificationCenter.addObserver( self, selector: #selector(keyboardWillShow(notification:)), - name: .UIKeyboardWillShow, + name: UIResponder.keyboardWillShowNotification, object: nil) notificationCenter.addObserver( self, selector: #selector(keyboardWillHide(notification:)), - name: .UIKeyboardWillHide, + name: UIResponder.keyboardWillHideNotification, object: nil) } private func unregisterKeyboardNotifications() { - NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillShow, object: nil) - NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillHide, object: nil) + NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillShowNotification, object: nil) + NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillHideNotification, object: nil) } @objc private func keyboardWillShow(notification: Notification) { diff --git a/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift b/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift index c07af2cc4..cebf3eddd 100644 --- a/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift +++ b/Riot/Modules/Common/KeyboardAvoiding/KeyboardNotification.swift @@ -29,21 +29,21 @@ public struct KeyboardNotification { } public var keyboardFrameBegin: CGRect? { - guard let value = userInfo[UIKeyboardFrameBeginUserInfoKey] as? NSValue else { + guard let value = userInfo[UIResponder.keyboardFrameBeginUserInfoKey] as? NSValue else { return nil } return value.cgRectValue } public var keyboardFrameEnd: CGRect? { - guard let value = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue else { + guard let value = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else { return nil } return value.cgRectValue } public var animationDuration: TimeInterval? { - guard let number = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? NSNumber else { + guard let number = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { return nil } return number.doubleValue @@ -51,15 +51,15 @@ public struct KeyboardNotification { /// Keyboard UIViewAnimationCurve enum raw value public var animationCurveRawValue: Int? { - guard let number = userInfo[UIKeyboardAnimationCurveUserInfoKey] as? NSNumber else { + guard let number = userInfo[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber else { return nil } return number.intValue } /// Convert UIViewAnimationCurve raw value to UIViewAnimationOptions - public func animationOptions(fallbackAnimationCurveValue: Int = UIViewAnimationCurve.easeInOut.rawValue) -> UIViewAnimationOptions { + public func animationOptions(fallbackAnimationCurveValue: Int = UIView.AnimationCurve.easeInOut.rawValue) -> UIView.AnimationOptions { let animationCurveRawValue = self.animationCurveRawValue ?? fallbackAnimationCurveValue - return UIViewAnimationOptions(rawValue: UInt(animationCurveRawValue << 16)) + return UIView.AnimationOptions(rawValue: UInt(animationCurveRawValue << 16)) } } From 7518421e2a49c2ebabd622abc4c66fc2708fa35a Mon Sep 17 00:00:00 2001 From: fridtjof <2780577+fridtjof@users.noreply.github.com> Date: Wed, 20 Feb 2019 18:12:18 +0100 Subject: [PATCH 11/73] fix changes made in ae4d7514 --- Riot/AppDelegate.m | 2 +- Riot/Modules/Contacts/ContactsTableViewController.m | 2 +- Riot/Modules/Contacts/DataSources/ContactsDataSource.m | 2 +- Riot/Modules/People/PeopleViewController.m | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index d6aee61ce..7d4b74eb2 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -3343,7 +3343,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN - (void)refreshLocalContacts { // Check whether the application is allowed to access the local contacts. - if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusAuthorized) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusAuthorized) { // Check the user permission for syncing local contacts. This permission was handled independently on previous application version. if (![MXKAppSettings standardAppSettings].syncLocalContacts) diff --git a/Riot/Modules/Contacts/ContactsTableViewController.m b/Riot/Modules/Contacts/ContactsTableViewController.m index a20ccc945..5a3256746 100644 --- a/Riot/Modules/Contacts/ContactsTableViewController.m +++ b/Riot/Modules/Contacts/ContactsTableViewController.m @@ -149,7 +149,7 @@ [[Analytics sharedInstance] trackScreen:_screenName]; // Check whether the access to the local contacts has not been already asked. - if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusNotDetermined) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusNotDetermined) { // 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 diff --git a/Riot/Modules/Contacts/DataSources/ContactsDataSource.m b/Riot/Modules/Contacts/DataSources/ContactsDataSource.m index ff9303167..fc396cbef 100644 --- a/Riot/Modules/Contacts/DataSources/ContactsDataSource.m +++ b/Riot/Modules/Contacts/DataSources/ContactsDataSource.m @@ -88,7 +88,7 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onContactManagerDidUpdate:) name:kMXKContactManagerDidUpdateLocalContactMatrixIDsNotification object:nil]; // Refresh the matrix identifiers for all the local contacts. - if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusAuthorized) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusNotDetermined) { // Refresh the matrix identifiers for all the local contacts. [[MXKContactManager sharedManager] updateMatrixIDsForAllLocalContacts]; diff --git a/Riot/Modules/People/PeopleViewController.m b/Riot/Modules/People/PeopleViewController.m index 6d2d88e36..fa8d84d0e 100644 --- a/Riot/Modules/People/PeopleViewController.m +++ b/Riot/Modules/People/PeopleViewController.m @@ -100,7 +100,7 @@ [super viewWillAppear:animated]; // Check whether the access to the local contacts has not been already asked. - if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] != CNAuthorizationStatusNotDetermined) + if ([CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusNotDetermined) { // 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 From 6d19f9253d86961cc5610b04cc7c5cd68293429a Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 20 Feb 2019 18:22:50 +0100 Subject: [PATCH 12/73] Add app store description as app string resource to make them available for translation on weblate #2201 --- CHANGES.rst | 3 ++- Riot/Assets/en.lproj/Vector.strings | 4 ++++ Riot/Generated/Strings.swift | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 57dc9ae60..6f32de976 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,7 +3,8 @@ Changes in 0.8.2 (2019-xx-xx) Improvements: * Upgrade MatrixKit version ([v0.9.6](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.9.6). - * Maintenance: Update cocopoads and pods. Automatic update to Swift4.2 + * Maintenance: Update cocopoads and pods. Automatic update to Swift4.2. + * Add app store description as app string resource to make them available for translation on weblate (#2201). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 301909692..beb282e7b 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -15,6 +15,10 @@ limitations under the License. */ +// String for App Store +"store_short_description" = "Secure decentralised chat/VoIP"; +"store_full_description" = "Communicate, your way.\n\nA chat app, under your control and entirely flexible. Riot lets you communicate the way you want. Made for [matrix] - the standard for open, decentralised communication.\n\nGet a free matrix.org account, get your own server at https://modular.im, or use another Matrix server.\n\nWhy choose Riot.im?\n\nCOMPLETE COMMUNICATION: Build rooms around your teams, your friends, your community - however you like! Chat, share files, add widgets and make voice and video calls - all free of charge.\n\nPOWERFUL INTEGRATIONS: Use Riot.im with the tools you know and love. With Riot.im you can even chat with users and groups on other chat apps.\n\nPRIVATE AND SECURE: Keep your conversations secret. State of the art end-to-end encryption ensures that private communication stays private.\n\nOPEN, NOT CLOSED: Open source, and built on Matrix. Own your own data by hosting your own server, or selecting one you trust.\n\nEVERYWHERE YOU ARE: Stay in touch wherever you are with fully synchronised message history across all your devices and online at https://riot.im."; + // Titles "title_home" = "Home"; "title_favourites" = "Favourites"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index c13db1340..8c5f900a0 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -2334,6 +2334,14 @@ internal enum VectorL10n { internal static var start: String { return VectorL10n.tr("Vector", "start") } + /// Communicate, your way.\n\nA chat app, under your control and entirely flexible. Riot lets you communicate the way you want. Made for [matrix] - the standard for open, decentralised communication.\n\nGet a free matrix.org account, get your own server at https://modular.im, or use another Matrix server.\n\nWhy choose Riot.im?\n\nCOMPLETE COMMUNICATION: Build rooms around your teams, your friends, your community - however you like! Chat, share files, add widgets and make voice and video calls - all free of charge.\n\nPOWERFUL INTEGRATIONS: Use Riot.im with the tools you know and love. With Riot.im you can even chat with users and groups on other chat apps.\n\nPRIVATE AND SECURE: Keep your conversations secret. State of the art end-to-end encryption ensures that private communication stays private.\n\nOPEN, NOT CLOSED: Open source, and built on Matrix. Own your own data by hosting your own server, or selecting one you trust.\n\nEVERYWHERE YOU ARE: Stay in touch wherever you are with fully synchronised message history across all your devices and online at https://riot.im. + internal static var storeFullDescription: String { + return VectorL10n.tr("Vector", "store_full_description") + } + /// Secure decentralised chat/VoIP + internal static var storeShortDescription: String { + return VectorL10n.tr("Vector", "store_short_description") + } /// Favourites internal static var titleFavourites: String { return VectorL10n.tr("Vector", "title_favourites") From a619500e3c70e74f0dcd3c32d3e6935e8801bc18 Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 21 Feb 2019 13:07:37 +0100 Subject: [PATCH 13/73] Reskin: Text in badges should be white in dark theme #2283 --- CHANGES.rst | 1 + .../Common/Recents/DataSources/RecentsDataSource.m | 2 +- .../Modules/Common/Recents/Views/RecentTableViewCell.m | 2 +- Riot/Modules/Communities/Views/GroupTableViewCell.m | 2 +- Riot/Modules/Home/Views/RoomCollectionViewCell.m | 2 +- Riot/Modules/Room/RoomViewController.m | 2 +- Riot/Modules/TabBar/MasterTabBarController.m | 10 ++++++++++ 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a7d01a1a7..2148c8f5c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,7 @@ Improvements: Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). + * Reskin: Text in badges should be white in dark theme (#2283). Changes in 0.8.1 (2019-02-19) =============================================== diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m index 058fab9b5..f4afd1afe 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m @@ -593,7 +593,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou if (count) { UILabel *missedNotifAndUnreadBadgeLabel = [[UILabel alloc] init]; - missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.backgroundColor; + missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.baseTextPrimaryColor; missedNotifAndUnreadBadgeLabel.font = [UIFont boldSystemFontOfSize:14]; if (count > 1000) { diff --git a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m index 4eb05500b..8f993f99b 100644 --- a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m +++ b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m @@ -51,7 +51,7 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; self.roomTitle.textColor = ThemeService.shared.theme.textPrimaryColor; self.lastEventDescription.textColor = ThemeService.shared.theme.textSecondaryColor; self.lastEventDate.textColor = ThemeService.shared.theme.textSecondaryColor; - self.missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.backgroundColor; + self.missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.baseTextPrimaryColor; // Prepare direct room border CGColorRef directRoomBorderColor = CGColorCreateCopyWithAlpha(ThemeService.shared.theme.tintColor.CGColor, kDirectRoomBorderColorAlpha); diff --git a/Riot/Modules/Communities/Views/GroupTableViewCell.m b/Riot/Modules/Communities/Views/GroupTableViewCell.m index a8d197120..313b01ac2 100644 --- a/Riot/Modules/Communities/Views/GroupTableViewCell.m +++ b/Riot/Modules/Communities/Views/GroupTableViewCell.m @@ -47,7 +47,7 @@ if (self.missedNotifAndUnreadBadgeLabel) { - self.missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.backgroundColor; + self.missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.baseTextPrimaryColor; } self.groupAvatar.defaultBackgroundColor = [UIColor clearColor]; diff --git a/Riot/Modules/Home/Views/RoomCollectionViewCell.m b/Riot/Modules/Home/Views/RoomCollectionViewCell.m index d555ee4c9..932ff775e 100644 --- a/Riot/Modules/Home/Views/RoomCollectionViewCell.m +++ b/Riot/Modules/Home/Views/RoomCollectionViewCell.m @@ -69,7 +69,7 @@ static const CGFloat kDirectRoomBorderWidth = 3.0; self.roomTitle.textColor = ThemeService.shared.theme.textPrimaryColor; self.roomTitle1.textColor = ThemeService.shared.theme.textPrimaryColor; self.roomTitle2.textColor = ThemeService.shared.theme.textPrimaryColor; - self.missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.backgroundColor; + self.missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.baseTextPrimaryColor; // Prepare direct room border CGColorRef directRoomBorderColor = CGColorCreateCopyWithAlpha(ThemeService.shared.theme.tintColor.CGColor, kDirectRoomBorderColorAlpha); diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 91dcc9552..9eb6616ea 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -449,7 +449,7 @@ self.expandedHeaderContainer.backgroundColor = ThemeService.shared.theme.baseColor; self.previewHeaderContainer.backgroundColor = ThemeService.shared.theme.headerBackgroundColor; - missedDiscussionsBadgeLabel.textColor = ThemeService.shared.theme.backgroundColor; + missedDiscussionsBadgeLabel.textColor = ThemeService.shared.theme.baseTextPrimaryColor; missedDiscussionsBadgeLabel.font = [UIFont boldSystemFontOfSize:14]; missedDiscussionsBadgeLabel.backgroundColor = [UIColor clearColor]; diff --git a/Riot/Modules/TabBar/MasterTabBarController.m b/Riot/Modules/TabBar/MasterTabBarController.m index b7290b760..0b18392bf 100644 --- a/Riot/Modules/TabBar/MasterTabBarController.m +++ b/Riot/Modules/TabBar/MasterTabBarController.m @@ -819,6 +819,11 @@ if (@available(iOS 10, *)) { self.tabBar.items[index].badgeColor = badgeColor; + + [self.tabBar.items[index] setBadgeTextAttributes:@{ + NSForegroundColorAttributeName: ThemeService.shared.theme.baseTextPrimaryColor + } + forState:UIControlStateNormal]; } } else @@ -836,6 +841,11 @@ if (@available(iOS 10, *)) { self.tabBar.items[index].badgeColor = badgeColor; + + [self.tabBar.items[index] setBadgeTextAttributes:@{ + NSForegroundColorAttributeName: ThemeService.shared.theme.baseTextPrimaryColor + } + forState:UIControlStateNormal]; } } else From 572039e762af129635c6b59c43b975ab99db046d Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 21 Feb 2019 15:07:50 +0100 Subject: [PATCH 14/73] RoomVC: Remove the beta warning modal when enabling e2e in a room This is the other part of #2239. --- CHANGES.rst | 1 + Riot/Assets/en.lproj/Vector.strings | 1 - Riot/Generated/Strings.swift | 4 -- .../Settings/RoomSettingsViewController.m | 45 ++----------------- 4 files changed, 4 insertions(+), 47 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2148c8f5c..f0ae4b3a3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,7 @@ Improvements: * Maintenance: Update cocopoads and pods. Automatic update to Swift4.2. * Add app store description as app string resource to make them available for translation on weblate (#2201). * Update deprecated contact availability checks (#2222). + * RoomVC: Remove the beta warning modal when enabling e2e in a room (#2239). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index beb282e7b..c328fd026 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -494,7 +494,6 @@ "room_details_advanced_e2e_encryption_enabled"="Encryption is enabled in this room"; "room_details_advanced_e2e_encryption_disabled"="Encryption is not enabled in this room."; "room_details_advanced_e2e_encryption_blacklist_unverified_devices"="Encrypt to verified devices only"; -"room_details_advanced_e2e_encryption_prompt_message"="End-to-end encryption is experimental and may not be reliable.\n\nYou should not yet trust it to secure data.\n\nDevices will not yet be able to decrypt history from before they joined the room.\n\nOnce encryption is enabled for a room it cannot be turned off again (for now).\n\nEncrypted messages will not be visible on clients that do not yet implement encryption."; "room_details_fail_to_update_avatar" = "Fail to update the room photo"; "room_details_fail_to_update_room_name" = "Fail to update the room name"; "room_details_fail_to_update_topic" = "Fail to update the topic"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index 8c5f900a0..7322f28f3 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -1126,10 +1126,6 @@ internal enum VectorL10n { internal static var roomDetailsAdvancedE2eEncryptionEnabled: String { return VectorL10n.tr("Vector", "room_details_advanced_e2e_encryption_enabled") } - /// End-to-end encryption is experimental and may not be reliable.\n\nYou should not yet trust it to secure data.\n\nDevices will not yet be able to decrypt history from before they joined the room.\n\nOnce encryption is enabled for a room it cannot be turned off again (for now).\n\nEncrypted messages will not be visible on clients that do not yet implement encryption. - internal static var roomDetailsAdvancedE2eEncryptionPromptMessage: String { - return VectorL10n.tr("Vector", "room_details_advanced_e2e_encryption_prompt_message") - } /// Enable encryption (warning: cannot be disabled again!) internal static var roomDetailsAdvancedEnableE2eEncryption: String { return VectorL10n.tr("Vector", "room_details_advanced_enable_e2e_encryption") diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index bd287fae9..afbaba5de 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -3421,48 +3421,9 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti { if (theSwitch.on) { - // Prompt here user before turning on the data encryption - __weak typeof(self) weakSelf = self; - - [currentAlert dismissViewControllerAnimated:NO completion:nil]; - - currentAlert = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"warning", @"Vector", nil) - message:NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_prompt_message", @"Vector", nil) - preferredStyle:UIAlertControllerStyleAlert]; - - [currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"] - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) { - - if (weakSelf) - { - typeof(self) self = weakSelf; - self->currentAlert = nil; - } - - // Reset switch change - theSwitch.on = NO; - - }]]; - - [currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"ok"] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { - - if (weakSelf) - { - typeof(self) self = weakSelf; - self->currentAlert = nil; - - self->updatedItemsDict[kRoomSettingsEncryptionKey] = @(YES); - - [self getNavigationItem].rightBarButtonItem.enabled = self->updatedItemsDict.count; - } - - }]]; - - [currentAlert mxk_setAccessibilityIdentifier:@"RoomSettingsVCEnableEncryptionAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + updatedItemsDict[kRoomSettingsEncryptionKey] = @(YES); + + [self getNavigationItem].rightBarButtonItem.enabled = self->updatedItemsDict.count; } else { From 8b517dfeb4607c035d80dc08d66ff159682da176 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 22 Feb 2019 10:39:12 +0100 Subject: [PATCH 15/73] Now use Cocoapods 1.6.x when using Fastlane --- Gemfile | 2 +- Gemfile.lock | 81 +++++++++++++++++++++++++++++----------------------- 2 files changed, 47 insertions(+), 36 deletions(-) diff --git a/Gemfile b/Gemfile index cacbc44b6..49ffe69fb 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gem "xcode-install" gem "fastlane" -gem "cocoapods", '~>1.5.3' +gem "cocoapods", '~>1.6.0' plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index c87735471..a760a701c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,45 +2,45 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (3.0.0) - activesupport (4.2.10) + activesupport (4.2.11) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.5.2) + addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) atomos (0.1.3) babosa (1.0.2) claide (1.0.2) - cocoapods (1.5.3) + cocoapods (1.6.0) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.5.3) + cocoapods-core (= 1.6.0) cocoapods-deintegrate (>= 1.0.2, < 2.0) - cocoapods-downloader (>= 1.2.0, < 2.0) + cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.3.0, < 2.0) + cocoapods-trunk (>= 1.3.1, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) - fourflusher (~> 2.0.1) + fourflusher (>= 2.2.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.6.5) + molinillo (~> 0.6.6) nap (~> 1.0) - ruby-macho (~> 1.1) - xcodeproj (>= 1.5.7, < 2.0) - cocoapods-core (1.5.3) + ruby-macho (~> 1.3, >= 1.3.1) + xcodeproj (>= 1.8.0, < 2.0) + cocoapods-core (1.6.0) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) cocoapods-deintegrate (1.0.2) - cocoapods-downloader (1.2.1) + cocoapods-downloader (1.2.2) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.0) - cocoapods-stats (1.0.0) + cocoapods-stats (1.1.0) cocoapods-trunk (1.3.1) nap (>= 0.8, < 2.0) netrc (~> 0.11) @@ -49,32 +49,33 @@ GEM colored2 (3.1.2) commander-fastlane (4.4.6) highline (~> 1.7.2) - concurrent-ruby (1.0.5) + concurrent-ruby (1.1.4) declarative (0.0.10) declarative-option (0.1.0) + digest-crc (0.4.1) domain_name (0.5.20180417) unf (>= 0.0.5, < 1.0.0) - dotenv (2.5.0) - emoji_regex (0.1.1) + dotenv (2.6.0) + emoji_regex (1.0.1) escape (0.0.4) excon (0.62.0) - faraday (0.15.3) + faraday (0.15.4) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) - faraday_middleware (0.12.2) + faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) - fastimage (2.1.4) - fastlane (2.105.2) + fastimage (2.1.5) + fastlane (2.116.1) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) - bundler (>= 1.12.0, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) colored commander-fastlane (>= 4.4.6, < 5.0.0) dotenv (>= 2.1.1, < 3.0.0) - emoji_regex (~> 0.1) + emoji_regex (>= 0.1, < 2.0) excon (>= 0.45.0, < 1.0.0) faraday (~> 0.9) faraday-cookie_jar (~> 0.0.6) @@ -82,6 +83,7 @@ GEM fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-api-client (>= 0.21.2, < 0.24.0) + google-cloud-storage (>= 1.15.0, < 2.0.0) highline (>= 1.7.2, < 2.0.0) json (< 3.0.0) mini_magick (~> 4.5.1) @@ -103,7 +105,7 @@ GEM xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-versioning (0.3.4) - fourflusher (2.0.1) + fourflusher (2.2.0) fuzzy_match (2.0.4) gh_inspector (1.1.3) google-api-client (0.23.9) @@ -114,10 +116,19 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.0) signet (~> 0.9) - googleauth (0.6.6) + google-cloud-core (1.3.0) + google-cloud-env (~> 1.0) + google-cloud-env (1.0.5) + faraday (~> 0.11) + google-cloud-storage (1.16.0) + digest-crc (~> 0.4) + google-api-client (~> 0.23) + google-cloud-core (~> 1.2) + googleauth (>= 0.6.2, < 0.10.0) + googleauth (0.6.7) faraday (~> 0.12) jwt (>= 1.4, < 3.0) - memoist (~> 0.12) + memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.7) @@ -144,7 +155,7 @@ GEM naturally (2.2.0) netrc (0.11.0) os (1.0.0) - plist (3.4.0) + plist (3.5.0) public_suffix (2.0.5) representable (3.0.4) declarative (< 0.1.0) @@ -152,10 +163,10 @@ GEM uber (< 0.2.0) retriable (3.1.2) rouge (2.0.7) - ruby-macho (1.3.1) + ruby-macho (1.4.0) rubyzip (1.2.2) security (0.1.3) - signet (0.10.0) + signet (0.11.0) addressable (~> 2.3) faraday (~> 0.9) jwt (>= 1.5, < 3.0) @@ -170,20 +181,20 @@ GEM thread_safe (0.3.6) tty-cursor (0.6.0) tty-screen (0.6.5) - tty-spinner (0.8.0) - tty-cursor (>= 0.5.0) + tty-spinner (0.9.0) + tty-cursor (~> 0.6.0) tzinfo (1.2.5) thread_safe (~> 0.1) uber (0.1.0) unf (0.1.4) unf_ext unf_ext (0.0.7.5) - unicode-display_width (1.4.0) + unicode-display_width (1.4.1) word_wrap (1.0.0) - xcode-install (2.4.4) + xcode-install (2.5.0) claide (>= 0.9.1, < 1.1.0) fastlane (>= 2.1.0, < 3.0.0) - xcodeproj (1.6.0) + xcodeproj (1.8.1) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -198,10 +209,10 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (~> 1.5.3) + cocoapods (~> 1.6.0) fastlane fastlane-plugin-versioning xcode-install BUNDLED WITH - 1.16.4 + 1.17.3 From 52e35d89cd264f636cb6b5a51c6f9182d4e502a3 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Mon, 25 Feb 2019 10:10:17 +0100 Subject: [PATCH 16/73] Update Cocoapods to 1.6.1 for Fastlane --- Gemfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a760a701c..176b06f10 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,10 +12,10 @@ GEM atomos (0.1.3) babosa (1.0.2) claide (1.0.2) - cocoapods (1.6.0) + cocoapods (1.6.1) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.6.0) + cocoapods-core (= 1.6.1) cocoapods-deintegrate (>= 1.0.2, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -29,13 +29,13 @@ GEM gh_inspector (~> 1.0) molinillo (~> 0.6.6) nap (~> 1.0) - ruby-macho (~> 1.3, >= 1.3.1) - xcodeproj (>= 1.8.0, < 2.0) - cocoapods-core (1.6.0) + ruby-macho (~> 1.4) + xcodeproj (>= 1.8.1, < 2.0) + cocoapods-core (1.6.1) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) - cocoapods-deintegrate (1.0.2) + cocoapods-deintegrate (1.0.3) cocoapods-downloader (1.2.2) cocoapods-plugins (1.0.0) nap @@ -55,7 +55,7 @@ GEM digest-crc (0.4.1) domain_name (0.5.20180417) unf (>= 0.0.5, < 1.0.0) - dotenv (2.6.0) + dotenv (2.7.1) emoji_regex (1.0.1) escape (0.0.4) excon (0.62.0) @@ -138,7 +138,7 @@ GEM httpclient (2.8.3) i18n (0.9.5) concurrent-ruby (~> 1.0) - json (2.1.0) + json (2.2.0) jwt (2.1.0) memoist (0.16.0) mime-types (3.2.2) From 9e19b03bec464b392ec4fd460fc73ad57e35e3c8 Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 25 Feb 2019 16:00:47 +0100 Subject: [PATCH 17/73] Fix crash in Settings in 0.8.1 #2295 --- CHANGES.rst | 1 + Riot/Modules/Settings/SettingsViewController.m | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index f0ae4b3a3..57ac0bfcc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,7 @@ Improvements: Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). * Reskin: Text in badges should be white in dark theme (#2283). + * Crash in Settings in 0.8.1 (#2295). Changes in 0.8.1 (2019-02-19) =============================================== diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index a955504a6..3ea8338fe 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -4256,8 +4256,10 @@ SignOutAlertPresenterDelegate> - (void)settingsKeyBackupTableViewSectionDidUpdate:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection { + [self.tableView beginUpdates]; [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:SETTINGS_SECTION_KEYBACKUP_INDEX] withRowAnimation:UITableViewRowAnimationAutomatic]; + [self.tableView endUpdates]; } - (MXKTableViewCellWithTextView *)settingsKeyBackupTableViewSection:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection textCellForRow:(NSInteger)textCellForRow From ccd8e72fa5f5c4462a0054372d1c07a8603de239 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 20 Feb 2019 11:34:07 +0000 Subject: [PATCH 18/73] Translated using Weblate (Bulgarian) Currently translated at 100.0% (614 of 614 strings) Translation: Riot iOS/Riot iOS Translate-URL: https://translate.riot.im/projects/riot-ios/riot-ios/bg/ --- Riot/Assets/bg.lproj/Vector.strings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Riot/Assets/bg.lproj/Vector.strings b/Riot/Assets/bg.lproj/Vector.strings index 2089e1a91..0e4ef2ce1 100644 --- a/Riot/Assets/bg.lproj/Vector.strings +++ b/Riot/Assets/bg.lproj/Vector.strings @@ -625,7 +625,7 @@ "key_backup_recover_banner_title_part2" = " за да четете шифрованата история на съобщенията на това устройство"; "settings_key_backup_info" = "Шифрованите съобщения са защитени с шифроване от край до край. Само Вие и получателят (получателите) имате ключове за прочитането им."; "settings_key_backup_info_signout_warning" = "Направете копие на ключовете преди да излезете от профила, за да не ги загубите."; -"settings_key_backup_button_use" = "Настрой резервно копие на ключовете"; +"settings_key_backup_button_use" = "Използвай резервно копие на ключовете"; // Key backup wrong version "e2e_key_backup_wrong_version_title" = "Ново резервно копие на ключовете"; "e2e_key_backup_wrong_version" = "Беше открит нов метод за резервно копиране на ключовете.\n\nАко това не е породено от Ваше действие, настройте нова парола в Настройки."; @@ -633,7 +633,7 @@ "e2e_key_backup_wrong_version_button_wasme" = "Бях аз"; "key_backup_setup_intro_setup_action_without_existing_backup" = "Започни използването на резервни копия на ключовете"; "key_backup_setup_intro_setup_action_with_existing_backup" = "Настрой създаването на резервни копия на ключовете"; -"key_backup_setup_intro_manual_export_info" = "(Разширени)"; +"key_backup_setup_intro_manual_export_info" = "(За напреднали)"; "key_backup_setup_intro_manual_export_action" = "Ръчно експортиране на ключовете"; "key_backup_setup_passphrase_title" = "Защитете резервното копие с парола"; "key_backup_setup_passphrase_setup_recovery_key_info" = "Или защитете резервното копие с ключ за възстановяване, който ще трябва да пазите на безопасно място."; From a1fd67c89f7b48acb166caf90a5e9e4b47bbcec3 Mon Sep 17 00:00:00 2001 From: Silke Date: Wed, 20 Feb 2019 15:13:01 +0000 Subject: [PATCH 19/73] Translated using Weblate (Dutch) Currently translated at 81.7% (502 of 614 strings) Translation: Riot iOS/Riot iOS Translate-URL: https://translate.riot.im/projects/riot-ios/riot-ios/nl/ --- Riot/Assets/nl.lproj/Vector.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Assets/nl.lproj/Vector.strings b/Riot/Assets/nl.lproj/Vector.strings index e3156c8d2..16359b7e6 100644 --- a/Riot/Assets/nl.lproj/Vector.strings +++ b/Riot/Assets/nl.lproj/Vector.strings @@ -322,7 +322,7 @@ "settings_fail_to_update_password" = "Wachtwoord updaten mislukt"; "settings_password_updated" = "Je wachtwoord is geüpdatet"; "settings_crypto_device_name" = "Apparaatnaam: "; -"settings_crypto_device_id" = "\nApparaat ID: "; +"settings_crypto_device_id" = "\nApparaat-ID: "; "settings_crypto_device_key" = "\nApparaatsleutel: "; "settings_crypto_export" = "Sleutels exporteren"; "settings_crypto_blacklist_unverified_devices" = "Alleen naar geverifieerde apparaten versleutelen"; From 885226b50dff7b46d3e43b8a732d59f7304499dc Mon Sep 17 00:00:00 2001 From: sergio Date: Sat, 23 Feb 2019 12:13:05 +0000 Subject: [PATCH 20/73] Translated using Weblate (Russian) Currently translated at 100.0% (614 of 614 strings) Translation: Riot iOS/Riot iOS Translate-URL: https://translate.riot.im/projects/riot-ios/riot-ios/ru/ --- Riot/Assets/ru.lproj/Vector.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Assets/ru.lproj/Vector.strings b/Riot/Assets/ru.lproj/Vector.strings index 213b8ea87..e370b4f75 100644 --- a/Riot/Assets/ru.lproj/Vector.strings +++ b/Riot/Assets/ru.lproj/Vector.strings @@ -652,7 +652,7 @@ "key_backup_setup_passphrase_setup_recovery_key_info" = "Или защитите резервную копию с помощью ключа восстановления, сохранив его в безопасном месте."; "key_backup_setup_passphrase_setup_recovery_key_action" = "(Расширенный) Настройка с ключом восстановления"; // Success from passphrase -"key_backup_setup_success_from_passphrase_info" = "Выполняется резервная копия ключей.\n\nКлюч восстановления это страховка — вы можете использовать его для восстановления доступа к вашим зашифрованным сообщениям, если забыли пароль.\n\nХраните ключ восстановления в очень надежном месте, например, в менеджере паролей (или сейфе)."; +"key_backup_setup_success_from_passphrase_info" = "Выполняется резервная копия ключей.\n\nКлюч восстановления — это страховка — вы можете использовать его для восстановления доступа к вашим зашифрованным сообщениям, если забудете пароль.\n\nХраните ключ восстановления в очень надежном месте, например, в менеджере паролей (или сейфе)."; // Success from recovery key "key_backup_setup_success_from_recovery_key_info" = "Выполняется резервная копия ключей.\n\nСохраните его в безопасном месте."; "sign_out_key_backup_in_progress_alert_discard_key_backup_action" = "Мне не нужны мои зашифрованные сообщения"; From 021a52cc08b40997816adcbec55e6f5297556b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20C?= Date: Tue, 26 Feb 2019 08:52:11 +0000 Subject: [PATCH 21/73] Translated using Weblate (French) Currently translated at 100.0% (615 of 615 strings) Translation: Riot iOS/Riot iOS Translate-URL: https://translate.riot.im/projects/riot-ios/riot-ios/fr/ --- Riot/Assets/fr.lproj/Vector.strings | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Riot/Assets/fr.lproj/Vector.strings b/Riot/Assets/fr.lproj/Vector.strings index 97ca1a803..fc3da7c60 100644 --- a/Riot/Assets/fr.lproj/Vector.strings +++ b/Riot/Assets/fr.lproj/Vector.strings @@ -669,3 +669,6 @@ "e2e_key_backup_wrong_version_button_wasme" = "Ça vient de moi"; "key_backup_setup_intro_manual_export_info" = "(Avancé)"; "key_backup_setup_intro_manual_export_action" = "Exporter les clés manuellement"; +// String for App Store +"store_short_description" = "Discussions et appels sécurisés et décentralisés"; +"store_full_description" = "Communiquez, à votre façon.\n\nUne application de discussion, que vous contrôlez et entièrement flexible. Riot vous laisse communiquer comme vous le souhaitez. Conçu pour [matrix], le standard pour les communications libres et décentralisées.\n\nCréez un compte matrix.org gratuit, gérez votre propre serveur sur https://modular.im ou utilisez un autre serveur Matrix.\n\nPourquoi choisir Riot.im ?\n\n• COMMUNICATION COMPLÈTE : Construisez des salons autours de vos équipes, de vos amis, de votre communauté comme vous le souhaitez ! Discutez, partagez des fichiers, ajoutez des widgets et passez des appels audio et vidéo gratuitement.\n\n• INTÉGRATIONS PUISSANTES : Utilisez Riot.im avec les outils que vous connaissez déjà. Avec Riot.im vous pouvez même discuter avec les utilisateurs et les groupes qui utilisent d'autres applications de discussion.\n\n• PRIVÉ ET SÉCURISÉ : Gardez vos conversations secrètes. Un chiffrement de bout en bout de pointe vous garanti que vos communications privées restent privées.\n\n• OUVERT, PAS FERMÉ : Open source, et construit autour de Matrix. Restez en possession de vos données en hébergeant votre propre serveur, ou choisissez celui auquel vous faites confiance.\n\n• PARTOUT OÙ VOUS ÊTES : Restez en contact où que vous soyez avec la synchronisation complète de l'historique de vos messages entre vos différents appareils et en ligne sur https://riot.im."; From 53a0f7b7f31efdb57068c2414fb3b6480fb305cf Mon Sep 17 00:00:00 2001 From: sergio Date: Tue, 26 Feb 2019 09:15:42 +0000 Subject: [PATCH 22/73] Translated using Weblate (Russian) Currently translated at 100.0% (615 of 615 strings) Translation: Riot iOS/Riot iOS Translate-URL: https://translate.riot.im/projects/riot-ios/riot-ios/ru/ --- Riot/Assets/ru.lproj/Vector.strings | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Riot/Assets/ru.lproj/Vector.strings b/Riot/Assets/ru.lproj/Vector.strings index e370b4f75..ce9aa8e13 100644 --- a/Riot/Assets/ru.lproj/Vector.strings +++ b/Riot/Assets/ru.lproj/Vector.strings @@ -670,3 +670,6 @@ // Key backup wrong version "e2e_key_backup_wrong_version_title" = "Новая резервная копия ключей"; "e2e_key_backup_wrong_version" = "Обнаружена новая резервная копия ключа безопасного сообщения.\n\nЕсли вы этого не делали, установите новую парольную фразу в настройках."; +// String for App Store +"store_short_description" = "Безопасный децентрализованный чат/VoIP"; +"store_full_description" = "Приложение для чата, под вашим контролем и полностью гибкое. Райот позволяет вам общаться так, как вы хотите. Сделано на [matrix] — стандарт для открытого, децентрализованного общения.\n\nПолучите бесплатную учетную запись на matrix.org, собственный сервер по адресу https://modular.im или используйте другой сервер Matrix.\n\nПочему стоит выбрать Riot.im?\n\n• ПОЛНАЯ СВЯЗЬ: создавайте комнаты для команд, друзей, сообщест — как хотите! Общайтесь, обменивайтесь файлами, добавляйте виджеты и совершайте голосовые и видеозвонки — и все это бесплатно.\n\n• МОЩНЫЕ ИНТЕГРАЦИИ: Используйте Riot.im с инструментами, которые знаете и любите. С Riot.im вы можете даже общаться с пользователями и группами других приложений.\n\n• ЧАСТНЫЕ И БЕЗОПАСНЫЕ: держите ваши разговоры в тайне. Современное сквозное шифрование гарантирует, что частное общение остается частным.\n\n• ОТКРЫТО, НЕ ЗАКРЫТО: Исходный код открыт, построено на Matrix. Владейте данными, используя собственный сервер или выбирайте тот, которому доверяете.\n\n• Везде, где вы находитесь: оставайтесь на связи, где бы вы ни находились, с полностью синхронизированной историей сообщений на всех ваших устройствах и в Интернете по адресу https://riot.im."; From 5ffc92a39f02ac13bf0977bae2b1f8ecd16531ed Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Tue, 26 Feb 2019 16:48:01 +0100 Subject: [PATCH 23/73] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index f0ae4b3a3..256eebed5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ Improvements: * Add app store description as app string resource to make them available for translation on weblate (#2201). * Update deprecated contact availability checks (#2222). * RoomVC: Remove the beta warning modal when enabling e2e in a room (#2239). + * Fastlane: Update to Xcode 10.1 (#2202). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). From 999264e395ce198851522bd8fe027a1703d97f4c Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 10:06:30 +0100 Subject: [PATCH 24/73] Add SwiftLint pod to enforce Swift style and conventions --- Podfile | 1 + Podfile.lock | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Podfile b/Podfile index 796298a32..2377b2a22 100644 --- a/Podfile +++ b/Podfile @@ -80,6 +80,7 @@ abstract_target 'RiotPods' do # Tools pod 'SwiftGen', '~> 6.1' + pod 'SwiftLint', '~> 0.30.1' target "Riot" do import_MatrixKit diff --git a/Podfile.lock b/Podfile.lock index 38c19fed1..7b874f889 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -71,7 +71,7 @@ PODS: - GZIP (~> 1.2.2) - libbase58 (~> 0.1.4) - OLMKit (~> 3.0.0) - - Realm (~> 3.13.1) + - Realm (~> 3.11.1) - MatrixSDK/JingleCallStack (0.12.2): - MatrixSDK/Core - WebRTC (= 63.11.20455) @@ -85,15 +85,16 @@ PODS: - PiwikTracker (4.4.2): - PiwikTracker/Core (= 4.4.2) - PiwikTracker/Core (4.4.2) - - Realm (3.13.1): - - Realm/Headers (= 3.13.1) - - Realm/Headers (3.13.1) + - Realm (3.11.2): + - Realm/Headers (= 3.11.2) + - Realm/Headers (3.11.2) - Reusable (4.0.5): - Reusable/Storyboard (= 4.0.5) - Reusable/View (= 4.0.5) - Reusable/Storyboard (4.0.5) - Reusable/View (4.0.5) - SwiftGen (6.1.0) + - SwiftLint (0.30.1) - WebRTC (63.11.20455) - zxcvbn-ios (1.0.4) @@ -108,7 +109,8 @@ DEPENDENCIES: - OLMKit - PiwikTracker (from `https://github.com/manuroe/matomo-sdk-ios.git`, branch `feature/CustomVariables`) - Reusable (~> 4.0) - - SwiftGen (~> 6.0) + - SwiftGen (~> 6.1) + - SwiftLint (~> 0.30.1) - zxcvbn-ios SPEC REPOS: @@ -128,6 +130,7 @@ SPEC REPOS: - Realm - Reusable - SwiftGen + - SwiftLint - WebRTC - zxcvbn-ios @@ -155,12 +158,13 @@ SPEC CHECKSUMS: MatrixSDK: 60a9472eacdf51e5110b8bc7beba844debf992ef OLMKit: 88eda69110489f817d59bcb4353b7c247570aa4f PiwikTracker: 42862c7b13028065c3dfd36b4dc38db8a5765acf - Realm: 50071da38fe079e0735e47c9f2eae738c68c5996 + Realm: 864477d028db77f7c5a0cba64a4892ad53db128a Reusable: 188be1a54ac0691bc66e5bb24ec6eb91971b315b SwiftGen: f872ca75cbd17bf7103c17f13dcfa0d9a15667b0 + SwiftLint: a54bf1fe12b55c68560eb2a7689dfc81458508f7 WebRTC: f2a6203584745fe53532633397557876b5d71640 zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c -PODFILE CHECKSUM: 17a74795e75026048d90793d2ebb0880eac5c55f +PODFILE CHECKSUM: e35dd68cbd07be4c9dcf9e481000dd4498982e8a -COCOAPODS: 1.6.0 +COCOAPODS: 1.6.1 From 93ff821a77634a5b4034a08abc18f47ca3f48149 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 10:07:00 +0100 Subject: [PATCH 25/73] Add SwiftLint rules file --- .swiftlint.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 .swiftlint.yml diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100755 index 000000000..2fce9c8de --- /dev/null +++ b/.swiftlint.yml @@ -0,0 +1,64 @@ +# rule identifiers to exclude from running +disabled_rules: + - trailing_whitespace + - todo + - conditional_binding_cascade + - mark + - vertical_whitespace + - syntactic_sugar + - unused_closure_parameter + - closure_parameter_position + - redundant_string_enum_value + - large_tuple + - shorthand_operator + - vertical_parameter_alignment + - identifier_name + +# some rules are only opt-in +opt_in_rules: + - force_unwrapping + - private_action + - explicit_init + +# paths to include during linting. `--path` is ignored if present. +included: + - Riot + +# paths to ignore during linting. Takes precedence over `included`. +excluded: + - Carthage + - Pods + - Riot/Generated/ + +line_length: + warning: 250 + error: 1000 + +file_length: + warning: 700 + error: 1000 + +type_body_length: + warning: 700 + error: 1000 + +function_parameter_count: + warning: 7 + error: 10 + +cyclomatic_complexity: + ignores_case_statements: true + warning: 20 + error: 25 + +function_body_length: + warning: 100 + error: 150 + +# naming rules can set warnings/errors for min_length and max_length +# additionally they can set excluded names +type_name: + min_length: 3 # only warning + max_length: # warning and error + warning: 150 + error: 1000 From bf4e7c2f14596e414b7f2abe1d1a507ab22cc5bc Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 10:07:21 +0100 Subject: [PATCH 26/73] Add SwiftLint to build phases --- Riot.xcodeproj/project.pbxproj | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index 6b4418e00..f5bef4c89 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -2964,6 +2964,7 @@ buildConfigurationList = F094A9C81B78D8F000B1FBBF /* Build configuration list for PBXNativeTarget "Riot" */; buildPhases = ( E34E30CD2CEE4A42FF8081D6 /* [CP] Check Pods Manifest.lock */, + B1D1AC122225A43600D64A6C /* ⚠️ SwiftLint */, B1098BD821ECD3ED000DDA48 /* 🛠 SwiftGen */, F094A99E1B78D8F000B1FBBF /* Sources */, F094A99F1B78D8F000B1FBBF /* Frameworks */, @@ -3363,6 +3364,24 @@ shellPath = /bin/sh; shellScript = "${PODS_ROOT}/SwiftGen/bin/swiftgen config run --config Tools/SwiftGen/swiftgen-config.yml\n"; }; + B1D1AC122225A43600D64A6C /* ⚠️ SwiftLint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "⚠️ SwiftLint"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${PODS_ROOT}/SwiftLint/swiftlint\n"; + }; E34E30CD2CEE4A42FF8081D6 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; From 9ab0b7400753f74b22c435f19c7f0761cd61348e Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 10:07:51 +0100 Subject: [PATCH 27/73] Fix SwiftLint warnings --- Riot/Categories/UIControl.swift | 6 +- .../OnBoarding/OnBoardingManager.swift | 8 +- Riot/Managers/Theme/Theme.swift | 2 +- Riot/Managers/Theme/Themes/DarkTheme.swift | 16 +-- Riot/Managers/Theme/Themes/DefaultTheme.swift | 18 ++-- .../Authentication/Views/TermsView.swift | 10 +- .../Recover/KeyBackupRecoverCoordinator.swift | 1 - ...ckupRecoverFromPassphraseCoordinator.swift | 1 - ...pRecoverFromPassphraseViewController.swift | 8 +- ...RecoverFromRecoveryKeyViewController.swift | 2 +- .../KeyBackupSetupIntroViewController.swift | 4 +- ...yBackupSetupPassphraseViewController.swift | 20 ++-- ...BackupSetupRecoveryKeyViewController.swift | 2 +- .../SettingsKeyBackupTableViewSection.swift | 99 ++++++------------- .../SettingsKeyBackupViewModel.swift | 11 +-- .../SettingsKeyBackupViewModelType.swift | 4 +- 16 files changed, 86 insertions(+), 126 deletions(-) diff --git a/Riot/Categories/UIControl.swift b/Riot/Categories/UIControl.swift index 0706d4c96..619f1e7cd 100644 --- a/Riot/Categories/UIControl.swift +++ b/Riot/Categories/UIControl.swift @@ -18,9 +18,9 @@ import UIKit // Source: https://stackoverflow.com/a/44917661 class ClosureSleeve { - let closure: () -> () + let closure: () -> Void - init(attachTo: AnyObject, closure: @escaping () -> ()) { + init(attachTo: AnyObject, closure: @escaping () -> Void) { self.closure = closure objc_setAssociatedObject(attachTo, "[\(arc4random())]", self, .OBJC_ASSOCIATION_RETAIN) } @@ -31,7 +31,7 @@ class ClosureSleeve { } extension UIControl { - func vc_addAction(for controlEvents: UIControl.Event = .primaryActionTriggered, action: @escaping () -> ()) { + func vc_addAction(for controlEvents: UIControl.Event = .primaryActionTriggered, action: @escaping () -> Void) { let sleeve = ClosureSleeve(attachTo: self, closure: action) addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents) } diff --git a/Riot/Managers/OnBoarding/OnBoardingManager.swift b/Riot/Managers/OnBoarding/OnBoardingManager.swift index fbfc7c844..9656fb213 100644 --- a/Riot/Managers/OnBoarding/OnBoardingManager.swift +++ b/Riot/Managers/OnBoarding/OnBoardingManager.swift @@ -53,16 +53,16 @@ final public class OnBoardingManager: NSObject { self.session.matrixRestClient.avatarUrl(forUser: Constants.riotBotMatrixId) { (response) in switch response { - case .success(_): + case .success: // Create DM room with Riot-bot let httpOperation = self.session.createRoom(name: nil, visibility: .private, alias: nil, topic: nil, invite: [Constants.riotBotMatrixId], invite3PID: nil, isDirect: true, preset: .trustedPrivateChat) { (response) in switch response { - case .success(_): + case .success: success?() case .failure(let error): - NSLog("[OnBoardingManager] Create chat with riot-bot failed"); + NSLog("[OnBoardingManager] Create chat with riot-bot failed") failure?(error) } } @@ -71,7 +71,7 @@ final public class OnBoardingManager: NSObject { httpOperation.maxNumberOfTries = Constants.createRiotBotDMRequestMaxNumberOfTries case .failure(let error): - NSLog("[OnBoardingManager] riot-bot is unknown or the user hs is non federated. Do not try to create a room with riot-bot"); + NSLog("[OnBoardingManager] riot-bot is unknown or the user hs is non federated. Do not try to create a room with riot-bot") failure?(error) } } diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 241c9924c..8ead5dbbe 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -60,7 +60,7 @@ import UIKit var scrollBarStyle: UIScrollView.IndicatorStyle { get } - var keyboardAppearance : UIKeyboardAppearance { get } + var keyboardAppearance: UIKeyboardAppearance { get } // MARK: - Colors not defined in the design palette diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index 4d08afb07..a3e6d1c5f 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -62,26 +62,26 @@ class DarkTheme: NSObject, Theme { var matrixSearchBackgroundImageTintColor: UIColor = UIColor(rgb: 0x7E7E7E) func applyStyle(onTabBar tabBar: UITabBar) { - tabBar.tintColor = self.tintColor; - tabBar.barTintColor = self.headerBackgroundColor; - tabBar.isTranslucent = false; + tabBar.tintColor = self.tintColor + tabBar.barTintColor = self.headerBackgroundColor + tabBar.isTranslucent = false } func applyStyle(onNavigationBar navigationBar: UINavigationBar) { - navigationBar.tintColor = self.baseTextPrimaryColor; + navigationBar.tintColor = self.baseTextPrimaryColor navigationBar.titleTextAttributes = [ NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor ] - navigationBar.barTintColor = self.baseColor; + navigationBar.barTintColor = self.baseColor // The navigation bar needs to be opaque so that its background color is the expected one - navigationBar.isTranslucent = false; + navigationBar.isTranslucent = false } func applyStyle(onSearchBar searchBar: UISearchBar) { searchBar.barStyle = .black - searchBar.tintColor = self.searchPlaceholderColor; - searchBar.barTintColor = self.headerBackgroundColor; + searchBar.tintColor = self.searchPlaceholderColor + searchBar.barTintColor = self.headerBackgroundColor } func applyStyle(onTextField texField: UITextField) { diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index 7690e6685..d2490640d 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -57,31 +57,31 @@ class DefaultTheme: NSObject, Theme { var keyboardAppearance: UIKeyboardAppearance = .light var placeholderTextColor: UIColor = UIColor(white: 0.7, alpha: 1.0) // Use default 70% gray color - var selectedBackgroundColor: UIColor? = nil // Use the default selection color + var selectedBackgroundColor: UIColor? // Use the default selection color var overlayBackgroundColor: UIColor = UIColor(white: 0.7, alpha: 0.5) var matrixSearchBackgroundImageTintColor: UIColor = UIColor(rgb: 0xE7E7E7) func applyStyle(onTabBar tabBar: UITabBar) { - tabBar.tintColor = self.tintColor; - tabBar.barTintColor = self.headerBackgroundColor; - tabBar.isTranslucent = false; + tabBar.tintColor = self.tintColor + tabBar.barTintColor = self.headerBackgroundColor + tabBar.isTranslucent = false } func applyStyle(onNavigationBar navigationBar: UINavigationBar) { - navigationBar.tintColor = self.baseTextPrimaryColor; + navigationBar.tintColor = self.baseTextPrimaryColor navigationBar.titleTextAttributes = [ NSAttributedString.Key.foregroundColor: self.baseTextPrimaryColor ] - navigationBar.barTintColor = self.baseColor; + navigationBar.barTintColor = self.baseColor // The navigation bar needs to be opaque so that its background color is the expected one - navigationBar.isTranslucent = false; + navigationBar.isTranslucent = false } func applyStyle(onSearchBar searchBar: UISearchBar) { searchBar.barStyle = .default - searchBar.tintColor = self.searchPlaceholderColor; - searchBar.barTintColor = self.headerBackgroundColor; + searchBar.tintColor = self.searchPlaceholderColor + searchBar.barTintColor = self.headerBackgroundColor } func applyStyle(onTextField texField: UITextField) { diff --git a/Riot/Modules/Authentication/Views/TermsView.swift b/Riot/Modules/Authentication/Views/TermsView.swift index 7a387fd7c..cc1f8b4a9 100644 --- a/Riot/Modules/Authentication/Views/TermsView.swift +++ b/Riot/Modules/Authentication/Views/TermsView.swift @@ -24,7 +24,7 @@ final class TermsView: UIView, NibOwnerLoadable, UITableViewDelegate, UITableVie @objc weak var delegate: MXKAuthInputsViewDelegate? - private var acceptedCallback: (()->Void)? + private var acceptedCallback: (() -> Void)? /// NavigationVC to display a policy content @@ -116,7 +116,7 @@ final class TermsView: UIView, NibOwnerLoadable, UITableViewDelegate, UITableVie acceptButton.alpha = acceptButton.isEnabled ? 1 : 0.5 } - @IBAction func didAcceptButtonTapped(_ sender: Any) { + @IBAction private func didAcceptButtonTapped(_ sender: Any) { if policies.count == acceptedPolicies.count { acceptedCallback?() } @@ -131,7 +131,9 @@ final class TermsView: UIView, NibOwnerLoadable, UITableViewDelegate, UITableVie func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: TableViewCellWithCheckBoxAndLabel.defaultReuseIdentifier(), for: indexPath) as! TableViewCellWithCheckBoxAndLabel + guard let cell = tableView.dequeueReusableCell(withIdentifier: TableViewCellWithCheckBoxAndLabel.defaultReuseIdentifier(), for: indexPath) as? TableViewCellWithCheckBoxAndLabel else { + fatalError("\(String(describing: TableViewCellWithCheckBoxAndLabel.self)) should be registered") + } let policy = policies[indexPath.row] let accepted = acceptedPolicies .contains(indexPath.row) @@ -186,7 +188,7 @@ final class TermsView: UIView, NibOwnerLoadable, UITableViewDelegate, UITableVie let webViewViewController: WebViewViewController = WebViewViewController(url: policy.url) webViewViewController.title = policy.name - let leftBarButtonItem: UIBarButtonItem = UIBarButtonItem(image: UIImage(named: "back_icon"), style: .plain, target: self, action:#selector(didTapCancelOnPolicyScreen)) + let leftBarButtonItem: UIBarButtonItem = UIBarButtonItem(image: UIImage(named: "back_icon"), style: .plain, target: self, action: #selector(didTapCancelOnPolicyScreen)) webViewViewController.navigationItem.leftBarButtonItem = leftBarButtonItem navigationController = RiotNavigationController() diff --git a/Riot/Modules/KeyBackup/Recover/KeyBackupRecoverCoordinator.swift b/Riot/Modules/KeyBackup/Recover/KeyBackupRecoverCoordinator.swift index 084bdc25e..3912c1715 100644 --- a/Riot/Modules/KeyBackup/Recover/KeyBackupRecoverCoordinator.swift +++ b/Riot/Modules/KeyBackup/Recover/KeyBackupRecoverCoordinator.swift @@ -129,4 +129,3 @@ extension KeyBackupRecoverCoordinator: KeyBackupRecoverSuccessViewControllerDele self.delegate?.keyBackupRecoverCoordinatorDidRecover(self) } } - diff --git a/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseCoordinator.swift b/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseCoordinator.swift index 40c85ff7e..eaf5c7ee6 100644 --- a/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseCoordinator.swift +++ b/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseCoordinator.swift @@ -70,4 +70,3 @@ extension KeyBackupRecoverFromPassphraseCoordinator: KeyBackupRecoverFromPassphr self.delegate?.keyBackupRecoverFromPassphraseCoordinatorDidCancel(self) } } - diff --git a/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseViewController.swift b/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseViewController.swift index 018d0255f..3d7ac2c7b 100644 --- a/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseViewController.swift +++ b/Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseViewController.swift @@ -130,16 +130,16 @@ final class KeyBackupRecoverFromPassphraseViewController: UIViewController { self.passphraseTitleLabel.textColor = theme.textPrimaryColor theme.applyStyle(onTextField: self.passphraseTextField) self.passphraseTextField.attributedPlaceholder = NSAttributedString(string: VectorL10n.keyBackupRecoverFromPassphrasePassphrasePlaceholder, - attributes: [.foregroundColor : theme.placeholderTextColor]) + attributes: [.foregroundColor: theme.placeholderTextColor]) self.theme.applyStyle(onButton: self.passphraseVisibilityButton) self.recoverButtonBackgroundView.backgroundColor = theme.backgroundColor theme.applyStyle(onButton: self.recoverButton) - let unknownRecoveryKeyAttributedString = NSMutableAttributedString(string: VectorL10n.keyBackupRecoverFromPassphraseLostPassphraseActionPart1, attributes: [.foregroundColor : self.theme.textPrimaryColor]) - let unknownRecoveryKeyAttributedStringPart2 = NSAttributedString(string: VectorL10n.keyBackupRecoverFromPassphraseLostPassphraseActionPart2, attributes: [.foregroundColor : self.theme.tintColor]) - let unknownRecoveryKeyAttributedStringPart3 = NSAttributedString(string: VectorL10n.keyBackupRecoverFromPassphraseLostPassphraseActionPart3, attributes: [.foregroundColor : self.theme.textPrimaryColor]) + let unknownRecoveryKeyAttributedString = NSMutableAttributedString(string: VectorL10n.keyBackupRecoverFromPassphraseLostPassphraseActionPart1, attributes: [.foregroundColor: self.theme.textPrimaryColor]) + let unknownRecoveryKeyAttributedStringPart2 = NSAttributedString(string: VectorL10n.keyBackupRecoverFromPassphraseLostPassphraseActionPart2, attributes: [.foregroundColor: self.theme.tintColor]) + let unknownRecoveryKeyAttributedStringPart3 = NSAttributedString(string: VectorL10n.keyBackupRecoverFromPassphraseLostPassphraseActionPart3, attributes: [.foregroundColor: self.theme.textPrimaryColor]) unknownRecoveryKeyAttributedString.append(unknownRecoveryKeyAttributedStringPart2) unknownRecoveryKeyAttributedString.append(unknownRecoveryKeyAttributedStringPart3) diff --git a/Riot/Modules/KeyBackup/Recover/RecoveryKey/KeyBackupRecoverFromRecoveryKeyViewController.swift b/Riot/Modules/KeyBackup/Recover/RecoveryKey/KeyBackupRecoverFromRecoveryKeyViewController.swift index ac097bc27..4b2bc5356 100644 --- a/Riot/Modules/KeyBackup/Recover/RecoveryKey/KeyBackupRecoverFromRecoveryKeyViewController.swift +++ b/Riot/Modules/KeyBackup/Recover/RecoveryKey/KeyBackupRecoverFromRecoveryKeyViewController.swift @@ -135,7 +135,7 @@ final class KeyBackupRecoverFromRecoveryKeyViewController: UIViewController { self.recoveryKeyTitleLabel.textColor = theme.textPrimaryColor theme.applyStyle(onTextField: self.recoveryKeyTextField) self.recoveryKeyTextField.attributedPlaceholder = NSAttributedString(string: VectorL10n.keyBackupRecoverFromRecoveryKeyRecoveryKeyPlaceholder, - attributes: [.foregroundColor : theme.placeholderTextColor]) + attributes: [.foregroundColor: theme.placeholderTextColor]) theme.applyStyle(onButton: self.importFileButton) diff --git a/Riot/Modules/KeyBackup/Setup/Intro/KeyBackupSetupIntroViewController.swift b/Riot/Modules/KeyBackup/Setup/Intro/KeyBackupSetupIntroViewController.swift index 8963b5af8..c38f882a9 100644 --- a/Riot/Modules/KeyBackup/Setup/Intro/KeyBackupSetupIntroViewController.swift +++ b/Riot/Modules/KeyBackup/Setup/Intro/KeyBackupSetupIntroViewController.swift @@ -133,12 +133,12 @@ final class KeyBackupSetupIntroViewController: UIViewController { private func showSkipAlert() { let alertController = UIAlertController(title: VectorL10n.keyBackupSetupSkipAlertTitle, message: VectorL10n.keyBackupSetupSkipAlertMessage, - preferredStyle:.alert) + preferredStyle: .alert) alertController.addAction(UIAlertAction(title: VectorL10n.continue, style: .cancel, handler: { action in })) - alertController.addAction(UIAlertAction(title: VectorL10n.keyBackupSetupSkipAlertSkipAction , style: .default, handler: { action in + alertController.addAction(UIAlertAction(title: VectorL10n.keyBackupSetupSkipAlertSkipAction, style: .default, handler: { action in self.delegate?.keyBackupSetupIntroViewControllerDidCancel(self) })) diff --git a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift index c9d51ff90..8fe14beac 100644 --- a/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift +++ b/Riot/Modules/KeyBackup/Setup/Passphrase/KeyBackupSetupPassphraseViewController.swift @@ -150,7 +150,7 @@ final class KeyBackupSetupPassphraseViewController: UIViewController { self.passphraseTitleLabel.textColor = theme.textPrimaryColor theme.applyStyle(onTextField: self.passphraseTextField) self.passphraseTextField.attributedPlaceholder = NSAttributedString(string: VectorL10n.keyBackupSetupPassphrasePassphrasePlaceholder, - attributes: [.foregroundColor : theme.placeholderTextColor]) + attributes: [.foregroundColor: theme.placeholderTextColor]) self.updatePassphraseAdditionalLabel() self.formSeparatorView.backgroundColor = theme.lineBreakColor @@ -158,7 +158,7 @@ final class KeyBackupSetupPassphraseViewController: UIViewController { self.confirmPassphraseTitleLabel.textColor = theme.textPrimaryColor theme.applyStyle(onTextField: self.confirmPassphraseTextField) self.confirmPassphraseTextField.attributedPlaceholder = NSAttributedString(string: VectorL10n.keyBackupSetupPassphraseConfirmPassphraseTitle, - attributes: [.foregroundColor : theme.placeholderTextColor]) + attributes: [.foregroundColor: theme.placeholderTextColor]) self.updateConfirmPassphraseAdditionalLabel() self.setPassphraseButton.backgroundColor = theme.backgroundColor @@ -277,12 +277,12 @@ final class KeyBackupSetupPassphraseViewController: UIViewController { private func render(viewState: KeyBackupSetupPassphraseViewState) { switch viewState { - case .loading: - self.renderLoading() - case .loaded: - self.renderLoaded() - case .error(let error): - self.render(error: error) + case .loading: + self.renderLoading() + case .loaded: + self.renderLoaded() + case .error(let error): + self.render(error: error) } } @@ -308,13 +308,13 @@ final class KeyBackupSetupPassphraseViewController: UIViewController { let alertController = UIAlertController(title: VectorL10n.keyBackupSetupSkipAlertTitle, message: VectorL10n.keyBackupSetupSkipAlertMessage, - preferredStyle:.alert) + preferredStyle: .alert) alertController.addAction(UIAlertAction(title: VectorL10n.continue, style: .cancel, handler: { action in self.viewModel.process(viewAction: .skipAlertContinue) })) - alertController.addAction(UIAlertAction(title: VectorL10n.keyBackupSetupSkipAlertSkipAction , style: .default, handler: { action in + alertController.addAction(UIAlertAction(title: VectorL10n.keyBackupSetupSkipAlertSkipAction, style: .default, handler: { action in self.viewModel.process(viewAction: .skipAlertSkip) })) diff --git a/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift index 9f7ba38be..751747364 100644 --- a/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift +++ b/Riot/Modules/KeyBackup/Setup/RecoveryKey/KeyBackupSetupRecoveryKeyViewController.swift @@ -193,7 +193,7 @@ final class KeyBackupSetupRecoveryKeyViewController: UIViewController { let alertController = UIAlertController(title: VectorL10n.keyBackupSetupSkipAlertTitle, message: VectorL10n.keyBackupSetupSkipAlertMessage, - preferredStyle:.alert) + preferredStyle: .alert) alertController.addAction(UIAlertAction(title: VectorL10n.continue, style: .cancel, handler: { action in self.viewModel.process(viewAction: .skipAlertContinue) diff --git a/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupTableViewSection.swift b/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupTableViewSection.swift index 549928268..4c50bcb3e 100644 --- a/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupTableViewSection.swift +++ b/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupTableViewSection.swift @@ -24,11 +24,11 @@ import UIKit func settingsKeyBackupTableViewSectionShowKeyBackupSetup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection) - func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showKeyBackupRecover keyBackupVersion:MXKeyBackupVersion) - func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showKeyBackupDeleteConfirm keyBackupVersion:MXKeyBackupVersion) + func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showKeyBackupRecover keyBackupVersion: MXKeyBackupVersion) + func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showKeyBackupDeleteConfirm keyBackupVersion: MXKeyBackupVersion) - func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showActivityIndicator show:Bool) - func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showError error:Error) + func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showActivityIndicator show: Bool) + func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showError error: Error) } @objc final class SettingsKeyBackupTableViewSection: NSObject { @@ -78,15 +78,15 @@ import UIKit return numberOfRows } - @objc func cellForRow(atRow row:Int) -> UITableViewCell { + @objc func cellForRow(atRow row: Int) -> UITableViewCell { var cell: UITableViewCell switch self.viewState { case .checkingBackup: - cell = self.renderCheckingBackupCell(atRow:row) + cell = self.renderCheckingBackupCell(atRow: row) case .noBackup: - cell = self.renderNoBackupCell(atRow:row) + cell = self.renderNoBackupCell(atRow: row) case .backup(let keyBackupVersion, let keyBackupVersionTrust): cell = self.renderBackupCell(atRow: row, @@ -94,13 +94,13 @@ import UIKit keyBackupVersionTrust: keyBackupVersionTrust) case .backupAndRunning(let keyBackupVersion, let keyBackupVersionTrust, let backupProgress): - cell = self.renderBackupAndRunningCell(atRow:row, + cell = self.renderBackupAndRunningCell(atRow: row, keyBackupVersion: keyBackupVersion, keyBackupVersionTrust: keyBackupVersionTrust, backupProgress: backupProgress) case .backupNotTrusted(let keyBackupVersion, let keyBackupVersionTrust): - cell = self.renderBackupNotTrustedCell(atRow:row, + cell = self.renderBackupNotTrustedCell(atRow: row, keyBackupVersion: keyBackupVersion, keyBackupVersionTrust: keyBackupVersionTrust) } @@ -125,7 +125,7 @@ import UIKit private func renderCheckingBackupCell(atRow row: Int) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } let cell: MXKTableViewCellWithTextView = delegate.settingsKeyBackupTableViewSection(self, textCellForRow: row) @@ -146,7 +146,7 @@ import UIKit private func renderNoBackupCell(atRow row: Int) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } var cell: UITableViewCell @@ -167,7 +167,7 @@ import UIKit cell = self.buttonCellForCreate(atRow: row) default: - cell = UITableViewCell.init() + cell = UITableViewCell() } return cell @@ -180,7 +180,7 @@ import UIKit private func renderBackupCell(atRow row: Int, keyBackupVersion: MXKeyBackupVersion, keyBackupVersionTrust: MXKeyBackupVersionTrust) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } var cell: UITableViewCell @@ -211,7 +211,7 @@ import UIKit case 2: let infoCell: MXKTableViewCellWithTextView = delegate.settingsKeyBackupTableViewSection(self, textCellForRow: row) - let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust); + let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust) infoCell.mxkTextView.text = backupTrust.joined(separator: "\n") cell = infoCell @@ -223,7 +223,7 @@ import UIKit cell = self.buttonCellForDelete(keyBackupVersion: keyBackupVersion, atRow: row) default: - cell = UITableViewCell.init() + cell = UITableViewCell() } return cell @@ -236,7 +236,7 @@ import UIKit private func renderBackupAndRunningCell(atRow row: Int, keyBackupVersion: MXKeyBackupVersion, keyBackupVersionTrust: MXKeyBackupVersionTrust, backupProgress: Progress) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } var cell: UITableViewCell @@ -269,7 +269,7 @@ import UIKit case 2: let infoCell: MXKTableViewCellWithTextView = delegate.settingsKeyBackupTableViewSection(self, textCellForRow: row) - let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust); + let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust) infoCell.mxkTextView.text = backupTrust.joined(separator: "\n") cell = infoCell @@ -281,7 +281,7 @@ import UIKit cell = self.buttonCellForDelete(keyBackupVersion: keyBackupVersion, atRow: row) default: - cell = UITableViewCell.init() + cell = UITableViewCell() } return cell @@ -294,7 +294,7 @@ import UIKit private func renderBackupNotTrustedCell(atRow row: Int, keyBackupVersion: MXKeyBackupVersion, keyBackupVersionTrust: MXKeyBackupVersionTrust) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } var cell: UITableViewCell @@ -325,7 +325,7 @@ import UIKit case 2: let infoCell: MXKTableViewCellWithTextView = delegate.settingsKeyBackupTableViewSection(self, textCellForRow: row) - let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust); + let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust) infoCell.mxkTextView.text = backupTrust.joined(separator: "\n") cell = infoCell @@ -337,7 +337,7 @@ import UIKit cell = self.buttonCellForDelete(keyBackupVersion: keyBackupVersion, atRow: row) default: - cell = UITableViewCell.init() + cell = UITableViewCell() } return cell @@ -357,64 +357,29 @@ import UIKit if device.fingerprint == self.userDevice.fingerprint { return VectorL10n.settingsKeyBackupInfoTrustSignatureValid - } - else if signature.valid && (device.verified == MXDeviceVerified) { + } else if signature.valid && (device.verified == MXDeviceVerified) { return VectorL10n.settingsKeyBackupInfoTrustSignatureValidDeviceVerified(displayName) - } - else if signature.valid && (device.verified != MXDeviceVerified) { + } else if signature.valid && (device.verified != MXDeviceVerified) { return VectorL10n.settingsKeyBackupInfoTrustSignatureValidDeviceUnverified(displayName) - } - else if !signature.valid && (device.verified == MXDeviceVerified) { + } else if !signature.valid && (device.verified == MXDeviceVerified) { return VectorL10n.settingsKeyBackupInfoTrustSignatureInvalidDeviceVerified(displayName) - } - else if !signature.valid && (device.verified != MXDeviceVerified) { + } else if !signature.valid && (device.verified != MXDeviceVerified) { return VectorL10n.settingsKeyBackupInfoTrustSignatureInvalidDeviceUnverified(displayName) } - return ""; + return "" } } - private func lastNonVerifiedDevice(_ keyBackupVersionTrust:MXKeyBackupVersionTrust) -> MXDeviceInfo? - { - var lastNonVerifiedDevice: MXDeviceInfo? - for signature in keyBackupVersionTrust.signatures.reversed() { - - guard let device = signature.device else { - continue - } - - if device.verified != MXDeviceVerified - { - lastNonVerifiedDevice = device - break - } - } - return lastNonVerifiedDevice - } - - private func lastUnVerifiableDevice(_ keyBackupVersionTrust:MXKeyBackupVersionTrust) -> String? - { - var lastUnVerifiableDevice: String? - for signature in keyBackupVersionTrust.signatures.reversed() { - - if signature.device == nil { - lastUnVerifiableDevice = signature.deviceId - break - } - } - return lastUnVerifiableDevice - } - // MARK: - Button cells private func buttonCellForCreate(atRow row: Int) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } - let cell:MXKTableViewCellWithButton = delegate.settingsKeyBackupTableViewSection(self, buttonCellForRow: row) + let cell: MXKTableViewCellWithButton = delegate.settingsKeyBackupTableViewSection(self, buttonCellForRow: row) let btnTitle = VectorL10n.settingsKeyBackupButtonCreate cell.mxkButton.setTitle(btnTitle, for: .normal) @@ -429,10 +394,10 @@ import UIKit private func buttonCellForRestore(keyBackupVersion: MXKeyBackupVersion, atRow row: Int, title: String = VectorL10n.settingsKeyBackupButtonRestore) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } - let cell:MXKTableViewCellWithButton = delegate.settingsKeyBackupTableViewSection(self, buttonCellForRow: row) + let cell: MXKTableViewCellWithButton = delegate.settingsKeyBackupTableViewSection(self, buttonCellForRow: row) cell.mxkButton.setTitle(title, for: .normal) cell.mxkButton.setTitle(title, for: .highlighted) cell.mxkButton.vc_addAction { @@ -443,10 +408,10 @@ import UIKit private func buttonCellForDelete(keyBackupVersion: MXKeyBackupVersion, atRow row: Int) -> UITableViewCell { guard let delegate = self.delegate else { - return UITableViewCell.init() + return UITableViewCell() } - let cell:MXKTableViewCellWithButton = delegate.settingsKeyBackupTableViewSection(self, buttonCellForRow: row) + let cell: MXKTableViewCellWithButton = delegate.settingsKeyBackupTableViewSection(self, buttonCellForRow: row) let btnTitle = VectorL10n.settingsKeyBackupButtonDelete cell.mxkButton.setTitle(btnTitle, for: .normal) cell.mxkButton.setTitle(btnTitle, for: .highlighted) diff --git a/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModel.swift b/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModel.swift index c8a265684..bbe3cabcd 100644 --- a/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModel.swift +++ b/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModel.swift @@ -48,16 +48,12 @@ final class SettingsKeyBackupViewModel: SettingsKeyBackupViewModelType { self.checkKeyBackupState() case .create: viewDelegate.settingsKeyBackupViewModelShowKeyBackupSetup(self) - break case .restore(let keyBackupVersion): viewDelegate.settingsKeyBackup(self, showKeyBackupRecover: keyBackupVersion) - break case .confirmDelete(let keyBackupVersion): viewDelegate.settingsKeyBackup(self, showKeyBackupDeleteConfirm: keyBackupVersion) - break case .delete(let keyBackupVersion): self.deleteKeyBackupVersion(keyBackupVersion) - break } } @@ -76,15 +72,14 @@ final class SettingsKeyBackupViewModel: SettingsKeyBackupViewModelType { return } - sself.computeState(withBackupVersionTrust:keyBackupVersionTrust) + sself.computeState(withBackupVersionTrust: keyBackupVersionTrust) }) - } - else { + } else { computeState() } } - private func computeState(withBackupVersionTrust keyBackupVersionTrust:MXKeyBackupVersionTrust? = nil) { + private func computeState(withBackupVersionTrust keyBackupVersionTrust: MXKeyBackupVersionTrust? = nil) { var viewState: SettingsKeyBackupViewState? switch self.keyBackup.state { diff --git a/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModelType.swift b/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModelType.swift index f7cc5e3bf..662462145 100644 --- a/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModelType.swift +++ b/Riot/Modules/Settings/KeyBackup/SettingsKeyBackupViewModelType.swift @@ -21,8 +21,8 @@ protocol SettingsKeyBackupViewModelViewDelegate: class { func settingsKeyBackupViewModel(_ viewModel: SettingsKeyBackupViewModelType, didUpdateNetworkRequestViewState networkRequestViewSate: SettingsKeyBackupNetworkRequestViewState) func settingsKeyBackupViewModelShowKeyBackupSetup(_ viewModel: SettingsKeyBackupViewModelType) - func settingsKeyBackup(_ viewModel: SettingsKeyBackupViewModelType, showKeyBackupRecover keyBackupVersion:MXKeyBackupVersion) - func settingsKeyBackup(_ viewModel: SettingsKeyBackupViewModelType, showKeyBackupDeleteConfirm keyBackupVersion:MXKeyBackupVersion) + func settingsKeyBackup(_ viewModel: SettingsKeyBackupViewModelType, showKeyBackupRecover keyBackupVersion: MXKeyBackupVersion) + func settingsKeyBackup(_ viewModel: SettingsKeyBackupViewModelType, showKeyBackupDeleteConfirm keyBackupVersion: MXKeyBackupVersion) } protocol SettingsKeyBackupViewModelType { From 39c12391480e408a90fc50c5a834e22caa60c0b9 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 10:12:04 +0100 Subject: [PATCH 28/73] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index 57ac0bfcc..2e964a43e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ Improvements: * Add app store description as app string resource to make them available for translation on weblate (#2201). * Update deprecated contact availability checks (#2222). * RoomVC: Remove the beta warning modal when enabling e2e in a room (#2239). + * Use SwiftLint to enforce Swift style and conventions (PR #2300). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). From 819cb1243e29dba816ab9aabfdd44020e4fb24cd Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 27 Feb 2019 09:57:41 +0000 Subject: [PATCH 29/73] Translated using Weblate (Bulgarian) Currently translated at 100.0% (615 of 615 strings) Translation: Riot iOS/Riot iOS Translate-URL: https://translate.riot.im/projects/riot-ios/riot-ios/bg/ --- Riot/Assets/bg.lproj/Vector.strings | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Riot/Assets/bg.lproj/Vector.strings b/Riot/Assets/bg.lproj/Vector.strings index 0e4ef2ce1..e6681c7ad 100644 --- a/Riot/Assets/bg.lproj/Vector.strings +++ b/Riot/Assets/bg.lproj/Vector.strings @@ -668,3 +668,6 @@ "sign_out_key_backup_in_progress_alert_title" = "В момента се прави резервно копие. Ако излезете сега, ще загубите достъп до шифрованите съобщения."; "sign_out_key_backup_in_progress_alert_discard_key_backup_action" = "Не ми трябват шифрованите съобщения"; "sign_out_key_backup_in_progress_alert_cancel_action" = "Ще почакам"; +// String for App Store +"store_short_description" = "Защитен децентрализиран чат/VoIP"; +"store_full_description" = "Комуникирай по свой начин.\n\nЧат приложение, което е изцяло гъвкаво и под Ваш контрол. Riot позволява да комуникирате по начина, по който искате. Направено за [matrix] - стандарт за отворена и децентрализирана комуникация.\n\nИзползвайте безплатен matrix.org акаунт, собствен сървър от https://modular.im или друг Matrix сървър.\n\nЗащо да изберете Riot.im?\n\n• ПЪЛНА КОМУНИКАЦИЯ: Създавайте каквито пожелаете чат стаи - свързани с работни екипи, приятели или друг вид общности! Чатете, споделяйте файлове, добавяйте приспособления и водете аудио и видео разговори - всичко това, изцяло безплатно.\n\n• МОЩНИ ИНТЕГРАЦИИ: Използвайте Riot.im с досега-познатите Ви инструменти. Посредством Riot.im дори можете да чатите с потребители и групи използващи други чат приложения.\n\n• ЛИЧНО И ЗАЩИТЕНО: Пазете комуникацията си в тайна. Съвременна технология за шифроване от край до край гарантира, че Вашата комуникацията наистина остава Ваша.\n\n• ОТВОРЕНО, А НЕ ЗАТВОРЕНО: Приложение с отворен код, изградено върху Matrix. Дръжте данните си под Ваш контрол, като използвате Ваш собствен сървър или като изберете сървър, на който вярвате.\n\n• КЪДЕТО И ДА СТЕ: Поддържайте връзка където и да сте, с напълно синхронизирана чат история на всички Ваши устройства или онлайн на https://riot.im."; From 98529abefe2dc85504cc05890965f2d05a223ccd Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 15:13:04 +0100 Subject: [PATCH 30/73] In podfile post install set explicit SWIFT_VERSION only for PiwikTracker --- Podfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Podfile b/Podfile index 2377b2a22..496f17a81 100644 --- a/Podfile +++ b/Podfile @@ -105,8 +105,13 @@ post_install do |installer| # Plus the app does not enable it target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' - config.build_settings['SWIFT_VERSION'] = '4.0' # Required for PiwikTracker. Should be removed + + # Required for PiwikTracker as `swift_version` is not defined in podspec. Should be removed + if target.name.include? 'PiwikTracker' + config.build_settings['SWIFT_VERSION'] = '4.0' + end end + end end From 2bfa2a2b862ab772186bd39beb086c2625a76e32 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 15:16:51 +0100 Subject: [PATCH 31/73] Remove not needed official podspec source from Podfile. As written in the doc "The official CocoaPods source is implicit". --- Podfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Podfile b/Podfile index 496f17a81..ca5ffda02 100644 --- a/Podfile +++ b/Podfile @@ -4,8 +4,6 @@ platform :ios, "9.0" # Use frameforks to allow usage of pod written in Swift (like PiwikTracker) use_frameworks! -source 'https://github.com/CocoaPods/Specs.git' - # Different flavours of pods to MatrixKit # The current MatrixKit pod version From 3147a142a07bd1043f66e862ab0696905c999054 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 15:17:04 +0100 Subject: [PATCH 32/73] Update podfile.lock checksum --- Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index 7b874f889..026cab9c0 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -165,6 +165,6 @@ SPEC CHECKSUMS: WebRTC: f2a6203584745fe53532633397557876b5d71640 zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c -PODFILE CHECKSUM: e35dd68cbd07be4c9dcf9e481000dd4498982e8a +PODFILE CHECKSUM: 3176215a897b46c2a49fe45e93d0a8b1f8a7b973 COCOAPODS: 1.6.1 From b292d799a31a48130933d37c83e6d78070083a3f Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 15:34:25 +0100 Subject: [PATCH 33/73] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index f17ec7adc..e606b7911 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,7 @@ Improvements: * RoomVC: Remove the beta warning modal when enabling e2e in a room (#2239). * Fastlane: Update to Xcode 10.1 (#2202). * Use SwiftLint to enforce Swift style and conventions (PR #2300). + * Fix SWIFT_VERSION configuration in post install hook of Podfile (PR #2302). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). From ca22fc3181627aeef2b1eaffaf9047677546959f Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 27 Feb 2019 16:59:51 +0100 Subject: [PATCH 34/73] version++ --- Riot/SupportingFiles/Info.plist | 4 ++-- RiotShareExtension/SupportingFiles/Info.plist | 4 ++-- SiriIntents/Info.plist | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Riot/SupportingFiles/Info.plist b/Riot/SupportingFiles/Info.plist index cd20e7e79..d09dfaa69 100644 --- a/Riot/SupportingFiles/Info.plist +++ b/Riot/SupportingFiles/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.8.1 + 0.8.2 CFBundleSignature ???? CFBundleVersion - 0.8.1 + 0.8.2 ITSAppUsesNonExemptEncryption ITSEncryptionExportComplianceCode diff --git a/RiotShareExtension/SupportingFiles/Info.plist b/RiotShareExtension/SupportingFiles/Info.plist index 6eff42362..a6bd2c237 100644 --- a/RiotShareExtension/SupportingFiles/Info.plist +++ b/RiotShareExtension/SupportingFiles/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.8.1 + 0.8.2 CFBundleVersion - 0.8.1 + 0.8.2 NSExtension NSExtensionAttributes diff --git a/SiriIntents/Info.plist b/SiriIntents/Info.plist index 623b6d3ed..d7700d65c 100644 --- a/SiriIntents/Info.plist +++ b/SiriIntents/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.8.1 + 0.8.2 CFBundleVersion - 0.8.1 + 0.8.2 NSExtension NSExtensionAttributes From d87cc1f8d44e7b456c6443771ad56a1525e875e2 Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 28 Feb 2019 22:09:57 +0000 Subject: [PATCH 35/73] Reskin: HomeVC: Use notices colors for badges background in section headers #2292 --- CHANGES.rst | 1 + Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index e606b7911..fdad0346b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,6 +14,7 @@ Improvements: Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). * Reskin: Text in badges should be white in dark theme (#2283). + * Reskin: HomeVC: use notices colors for badges background in section headers (#2292). * Crash in Settings in 0.8.1 (#2295). Changes in 0.8.1 (2019-02-19) diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m index f4afd1afe..68b492874 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m @@ -584,10 +584,12 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou { sectionArray = serverNoticeCellDataArray; } - + + BOOL highlight = NO; for (id cellData in sectionArray) { count += cellData.notificationCount; + highlight |= (cellData.highlightCount > 0); } if (count) @@ -611,7 +613,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou missedNotifAndUnreadBadgeBgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, bgViewWidth, 20)]; [missedNotifAndUnreadBadgeBgView.layer setCornerRadius:10]; - missedNotifAndUnreadBadgeBgView.backgroundColor = ThemeService.shared.theme.headerTextSecondaryColor; + missedNotifAndUnreadBadgeBgView.backgroundColor = highlight ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor; [missedNotifAndUnreadBadgeBgView addSubview:missedNotifAndUnreadBadgeLabel]; missedNotifAndUnreadBadgeLabel.center = missedNotifAndUnreadBadgeBgView.center; From 368275861e87098d78fe0b877b6e1f743023b470 Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 4 Mar 2019 16:52:22 +0100 Subject: [PATCH 36/73] Authentication: support SSO by using the fallback URL #2306 --- Riot/Assets/en.lproj/Vector.strings | 1 + Riot/Generated/Strings.swift | 4 ++ .../AuthenticationViewController.m | 33 ++++++++- .../Authentication/Views/AuthInputsView.h | 8 +++ .../Authentication/Views/AuthInputsView.m | 70 +++++++++++++------ .../Authentication/Views/AuthInputsView.xib | 26 +++++++ 6 files changed, 118 insertions(+), 24 deletions(-) diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index c328fd026..e2f99441d 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -62,6 +62,7 @@ "auth_register" = "Register"; "auth_submit" = "Submit"; "auth_skip" = "Skip"; +"auth_login_single_sign_on" = "Sign in with single sign-on"; "auth_send_reset_email" = "Send Reset Email"; "auth_return_to_login" = "Return to login screen"; "auth_user_id_placeholder" = "Email or user name"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index 7322f28f3..aed986861 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -102,6 +102,10 @@ internal enum VectorL10n { internal static var authLogin: String { return VectorL10n.tr("Vector", "auth_login") } + /// Sign in with single sign-on + internal static var authLoginSingleSignOn: String { + return VectorL10n.tr("Vector", "auth_login_single_sign_on") + } /// Missing email address internal static var authMissingEmail: String { return VectorL10n.tr("Vector", "auth_missing_email") diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index 3449cca21..21fc7187d 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -119,7 +119,10 @@ MXAuthenticationSession *authSession = [MXAuthenticationSession modelFromJSON:@{@"flows":@[@{@"stages":@[kMXLoginFlowTypePassword]}]}]; [authInputsView setAuthSession:authSession withAuthType:MXKAuthenticationTypeLogin]; self.authInputsView = authInputsView; - + + // Listen to action within the child view + [authInputsView.ssoButton addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; + // Observe user interface theme change. kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) { @@ -365,6 +368,21 @@ } } +- (void)handleAuthenticationSession:(MXAuthenticationSession *)authSession +{ + [super handleAuthenticationSession:authSession]; + + // Hide "Forgot password" and "Log in" buttons in case of SSO + [self updateForgotPwdButtonVisibility]; + + AuthInputsView *authInputsview; + if ([self.authInputsView isKindOfClass:AuthInputsView.class]) + { + authInputsview = (AuthInputsView*)self.authInputsView; + } + self.submitButton.hidden = authInputsview.isSingleSignOnRequired; +} + - (IBAction)onButtonPressed:(id)sender { if (sender == self.customServersTickButton) @@ -477,6 +495,11 @@ [super onButtonPressed:self.submitButton]; } + else if (sender == ((AuthInputsView*)self.authInputsView).ssoButton) + { + // Do SSO using the fallback URL + [self showAuthenticationFallBackView]; + } else { [super onButtonPressed:sender]; @@ -592,7 +615,13 @@ - (void)updateForgotPwdButtonVisibility { - self.forgotPasswordButton.hidden = (self.authType != MXKAuthenticationTypeLogin); + AuthInputsView *authInputsview; + if ([self.authInputsView isKindOfClass:AuthInputsView.class]) + { + authInputsview = (AuthInputsView*)self.authInputsView; + } + + self.forgotPasswordButton.hidden = (self.authType != MXKAuthenticationTypeLogin) || authInputsview.isSingleSignOnRequired; // Adjust minimum leading constraint of the submit button if (self.forgotPasswordButton.isHidden) diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.h b/Riot/Modules/Authentication/Views/AuthInputsView.h index f2c1dbbd8..4f857c682 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.h +++ b/Riot/Modules/Authentication/Views/AuthInputsView.h @@ -54,6 +54,9 @@ @property (weak, nonatomic) IBOutlet UIView *recaptchaContainer; @property (weak, nonatomic) IBOutlet TermsView *termsView; +@property (weak, nonatomic) IBOutlet TermsView *ssoButtonContainer; +@property (weak, nonatomic) IBOutlet UIButton *ssoButton; + /** Tell whether some third-party identifiers may be added during the account registration. */ @@ -80,6 +83,11 @@ */ @property (nonatomic, readonly) BOOL isThirdPartyIdentifierPending; +/** + Tell whether the flow requires a Single-Sign-On flow. + */ +@property (nonatomic, readonly) BOOL isSingleSignOnRequired; + /** The current selected country code */ diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.m b/Riot/Modules/Authentication/Views/AuthInputsView.m index 09ddcb3b3..9882427c5 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.m +++ b/Riot/Modules/Authentication/Views/AuthInputsView.m @@ -67,6 +67,7 @@ _thirdPartyIdentifiersHidden = YES; _isThirdPartyIdentifierPending = NO; + _isSingleSignOnRequired = NO; self.userLoginTextField.placeholder = NSLocalizedStringFromTable(@"auth_user_id_placeholder", @"Vector", nil); self.repeatPasswordTextField.placeholder = NSLocalizedStringFromTable(@"auth_repeat_password_placeholder", @"Vector", nil); @@ -119,6 +120,12 @@ self.passwordSeparator.backgroundColor = ThemeService.shared.theme.lineBreakColor; self.repeatPasswordSeparator.backgroundColor = ThemeService.shared.theme.lineBreakColor; + [self.ssoButton.layer setCornerRadius:5]; + self.ssoButton.clipsToBounds = YES; + [self.ssoButton setTitle:NSLocalizedStringFromTable(@"auth_login_single_sign_on", @"Vector", nil) forState:UIControlStateNormal]; + [self.ssoButton setTitle:NSLocalizedStringFromTable(@"auth_login_single_sign_on", @"Vector", nil) forState:UIControlStateHighlighted]; + self.ssoButton.backgroundColor = ThemeService.shared.theme.tintColor; + if (self.userLoginTextField.placeholder) { self.userLoginTextField.attributedPlaceholder = [[NSAttributedString alloc] @@ -189,30 +196,44 @@ { if (authType == MXKAuthenticationTypeLogin) { - self.passWordTextField.returnKeyType = UIReturnKeyDone; - self.phoneTextField.returnKeyType = UIReturnKeyNext; - - self.userLoginTextField.placeholder = NSLocalizedStringFromTable(@"auth_user_id_placeholder", @"Vector", nil); - self.messageLabel.text = NSLocalizedStringFromTable(@"or", @"Vector", nil); - self.phoneTextField.placeholder = NSLocalizedStringFromTable(@"auth_phone_placeholder", @"Vector", nil); + _isSingleSignOnRequired = NO; - self.userLoginTextField.attributedPlaceholder = [[NSAttributedString alloc] - initWithString:self.userLoginTextField.placeholder + if ([self isFlowSupported:kMXLoginFlowTypePassword]) + { + self.passWordTextField.returnKeyType = UIReturnKeyDone; + self.phoneTextField.returnKeyType = UIReturnKeyNext; + + self.userLoginTextField.placeholder = NSLocalizedStringFromTable(@"auth_user_id_placeholder", @"Vector", nil); + self.messageLabel.text = NSLocalizedStringFromTable(@"or", @"Vector", nil); + self.phoneTextField.placeholder = NSLocalizedStringFromTable(@"auth_phone_placeholder", @"Vector", nil); + + self.userLoginTextField.attributedPlaceholder = [[NSAttributedString alloc] + initWithString:self.userLoginTextField.placeholder + attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}]; + self.phoneTextField.attributedPlaceholder = [[NSAttributedString alloc] + initWithString:self.phoneTextField.placeholder attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}]; - self.phoneTextField.attributedPlaceholder = [[NSAttributedString alloc] - initWithString:self.phoneTextField.placeholder - attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}]; - - self.userLoginContainer.hidden = NO; - self.messageLabel.hidden = NO; - self.phoneContainer.hidden = NO; - self.passwordContainer.hidden = NO; - - self.messageLabelTopConstraint.constant = 59; - self.phoneContainerTopConstraint.constant = 70; - self.passwordContainerTopConstraint.constant = 150; - - self.currentLastContainer = self.passwordContainer; + + self.userLoginContainer.hidden = NO; + self.messageLabel.hidden = NO; + self.phoneContainer.hidden = NO; + self.passwordContainer.hidden = NO; + + self.messageLabelTopConstraint.constant = 59; + self.phoneContainerTopConstraint.constant = 70; + self.passwordContainerTopConstraint.constant = 150; + + self.currentLastContainer = self.passwordContainer; + } + else if ([self isFlowSupported:kMXLoginFlowTypeCAS] + || [self isFlowSupported:kMXLoginFlowTypeSSO]) + { + + self.ssoButtonContainer.hidden = NO; + self.currentLastContainer = self.ssoButtonContainer; + + _isSingleSignOnRequired = YES; + } } else { @@ -1242,6 +1263,7 @@ self.messageLabel.hidden = YES; self.recaptchaContainer.hidden = YES; self.termsView.hidden = YES; + self.ssoButtonContainer.hidden = YES; _currentLastContainer = nil; } @@ -1362,6 +1384,10 @@ { return YES; } + else if ([flowType isEqualToString:kMXLoginFlowTypeCAS] || [flowType isEqualToString:kMXLoginFlowTypeSSO]) + { + return YES; + } return NO; } diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.xib b/Riot/Modules/Authentication/Views/AuthInputsView.xib index 1e34290d6..f24ca9a98 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.xib +++ b/Riot/Modules/Authentication/Views/AuthInputsView.xib @@ -14,6 +14,27 @@ + @@ -259,17 +280,20 @@ + + + @@ -310,6 +334,8 @@ + + From e3ffeeac0568fbcb56d543ce16d92e1fa0f54918 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Mon, 4 Mar 2019 17:03:04 +0100 Subject: [PATCH 37/73] Use MXKMessageTextView in text message bubble cells to allow link detection without text selection --- .../MessagesSearchResultTextMsgBubbleCell.xib | 15 +++++++-------- ...RoomIncomingEncryptedTextMsgBubbleCell.xib | 19 +++++++++---------- ...edTextMsgWithPaginationTitleBubbleCell.xib | 15 +++++++-------- ...nationTitleWithoutSenderNameBubbleCell.xib | 15 +++++++-------- ...ptedTextMsgWithoutSenderInfoBubbleCell.xib | 19 +++++++++---------- ...ptedTextMsgWithoutSenderNameBubbleCell.xib | 19 +++++++++---------- ...RoomOutgoingEncryptedTextMsgBubbleCell.xib | 19 +++++++++---------- ...edTextMsgWithPaginationTitleBubbleCell.xib | 15 +++++++-------- ...nationTitleWithoutSenderNameBubbleCell.xib | 15 +++++++-------- ...ptedTextMsgWithoutSenderInfoBubbleCell.xib | 19 +++++++++---------- ...ptedTextMsgWithoutSenderNameBubbleCell.xib | 19 +++++++++---------- .../RoomIncomingTextMsgBubbleCell.xib | 17 ++++++++--------- ...ngTextMsgWithPaginationTitleBubbleCell.xib | 13 ++++++------- ...nationTitleWithoutSenderNameBubbleCell.xib | 13 ++++++------- ...mingTextMsgWithoutSenderInfoBubbleCell.xib | 17 ++++++++--------- ...mingTextMsgWithoutSenderNameBubbleCell.xib | 17 ++++++++--------- .../RoomOutgoingTextMsgBubbleCell.xib | 17 ++++++++--------- ...ngTextMsgWithPaginationTitleBubbleCell.xib | 13 ++++++------- ...nationTitleWithoutSenderNameBubbleCell.xib | 13 ++++++------- ...oingTextMsgWithoutSenderInfoBubbleCell.xib | 17 ++++++++--------- ...oingTextMsgWithoutSenderNameBubbleCell.xib | 17 ++++++++--------- 21 files changed, 161 insertions(+), 182 deletions(-) diff --git a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.xib b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.xib index bec259ca4..25e9903ea 100644 --- a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.xib +++ b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -16,7 +15,7 @@ - + @@ -61,8 +60,8 @@ - - + + @@ -74,7 +73,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgBubbleCell.xib index b8f96ec0f..611bf3f9e 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -29,7 +28,7 @@ - + @@ -47,8 +46,8 @@ - - + + @@ -60,7 +59,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleBubbleCell.xib index e8e676adb..8ecefacf3 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -59,7 +58,7 @@ - + @@ -77,8 +76,8 @@ - - + + @@ -90,7 +89,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib index 1511063c8..1e1e643bb 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -59,15 +58,15 @@ - + - - + + @@ -79,7 +78,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib index 2904caf2c..4c51007cd 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,19 +15,19 @@ - + - + - - + + @@ -40,7 +39,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderNameBubbleCell.xib index 6b04b8730..5423b5114 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomIncomingEncryptedTextMsgWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -29,15 +28,15 @@ - + - - + + @@ -49,7 +48,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgBubbleCell.xib index 8a7790762..2741c24f0 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -29,7 +28,7 @@ - + @@ -47,8 +46,8 @@ - - + + @@ -60,7 +59,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleBubbleCell.xib index 923e53493..ff15cac86 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -59,7 +58,7 @@ - + @@ -77,8 +76,8 @@ - - + + @@ -90,7 +89,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib index 96977e012..e248c6d1b 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -59,15 +58,15 @@ - + - - + + @@ -79,7 +78,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib index 6efca20e0..c8b70be42 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderInfoBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,19 +15,19 @@ - + - + - - + + @@ -40,7 +39,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderNameBubbleCell.xib index 4b53a5c45..81b1fdbbc 100644 --- a/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/Encryption/RoomOutgoingEncryptedTextMsgWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -29,15 +28,15 @@ - + - - + + @@ -49,7 +48,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.xib index 425de3680..661f526f3 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -39,8 +38,8 @@ - - + + @@ -52,7 +51,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib index 622050e31..bbe8bdcfc 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -69,8 +68,8 @@ - - + + @@ -82,7 +81,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib index 512df34e2..4ebb1316e 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -58,8 +57,8 @@ - - + + @@ -71,7 +70,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderInfoBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderInfoBubbleCell.xib index ac18c04db..beb05ac77 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderInfoBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderInfoBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,11 +15,11 @@ - + - - + + @@ -32,7 +31,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderNameBubbleCell.xib index b6c9825ac..f9361a748 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -28,8 +27,8 @@ - - + + @@ -41,7 +40,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.xib index a43024c5a..1d9fb0c29 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -39,8 +38,8 @@ - - + + @@ -52,7 +51,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib index 3923c7952..e7615d6dd 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -69,8 +68,8 @@ - - + + @@ -82,7 +81,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib index d7c8f4bd9..6883627e5 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithPaginationTitleWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - + - - + @@ -58,8 +57,8 @@ - - + + @@ -71,7 +70,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib index 06543dc5a..2ca307ef4 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,11 +15,11 @@ - + - - + + @@ -32,7 +31,7 @@ diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderNameBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderNameBubbleCell.xib index c88081ba2..2d7026464 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderNameBubbleCell.xib +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgWithoutSenderNameBubbleCell.xib @@ -1,12 +1,11 @@ - - + + - - + @@ -16,7 +15,7 @@ - + @@ -28,8 +27,8 @@ - - + + @@ -41,7 +40,7 @@ From 5aca2c2a60aabad718faa941b2de01fa9893ed03 Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 4 Mar 2019 17:25:21 +0100 Subject: [PATCH 38/73] Authentication: support SSO by using the fallback URL #2306 Disable register button on SSO --- .../AuthenticationViewController.m | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index 21fc7187d..b25074b80 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -324,6 +324,9 @@ - (void)setUserInteractionEnabled:(BOOL)userInteractionEnabled { super.userInteractionEnabled = userInteractionEnabled; + + // Reset + self.rightBarButtonItem.enabled = YES; // Show/Hide server options if (_optionsContainer.hidden == userInteractionEnabled) @@ -344,19 +347,33 @@ } else { + AuthInputsView *authInputsview; + if ([self.authInputsView isKindOfClass:AuthInputsView.class]) + { + authInputsview = (AuthInputsView*)self.authInputsView; + } + // The right bar button is used to switch the authentication type. if (self.authType == MXKAuthenticationTypeLogin) { - self.rightBarButtonItem.title = NSLocalizedStringFromTable(@"auth_register", @"Vector", nil); + if (!authInputsview.isSingleSignOnRequired) + { + self.rightBarButtonItem.title = NSLocalizedStringFromTable(@"auth_register", @"Vector", nil); + } + else + { + // Disable register on SSO + self.rightBarButtonItem.enabled = NO; + self.rightBarButtonItem.title = nil; + } } else if (self.authType == MXKAuthenticationTypeRegister) { self.rightBarButtonItem.title = NSLocalizedStringFromTable(@"auth_login", @"Vector", nil); // Restore the back button - if ([self.authInputsView isKindOfClass:AuthInputsView.class]) + if (authInputsview) { - AuthInputsView *authInputsview = (AuthInputsView*)self.authInputsView; [self updateRegistrationScreenWithThirdPartyIdentifiersHidden:authInputsview.thirdPartyIdentifiersHidden]; } } From d99ef7d377cb4d4658c9317bb018880c2eb7a1dc Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Mon, 4 Mar 2019 18:03:20 +0100 Subject: [PATCH 39/73] Add convenient method on UIApplication for opening an URL on iOS 9 and iOS 10+ --- Riot.xcodeproj/project.pbxproj | 4 +++ Riot/Categories/UIApplication.swift | 38 +++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 Riot/Categories/UIApplication.swift diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index f5bef4c89..aba1424ef 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -64,6 +64,7 @@ B1098C0D21ED07E4000DDA48 /* NavigationRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1098C0821ED07E4000DDA48 /* NavigationRouter.swift */; }; B1098C1021ED07E4000DDA48 /* Presentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1098C0B21ED07E4000DDA48 /* Presentable.swift */; }; B1098C1121ED07E4000DDA48 /* NavigationRouterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1098C0C21ED07E4000DDA48 /* NavigationRouterType.swift */; }; + B109D6F1222D8C400061B6D9 /* UIApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = B109D6F0222D8C400061B6D9 /* UIApplication.swift */; }; B10B3B5B2201DD740072C76B /* KeyBackupBannerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10B3B592201DD740072C76B /* KeyBackupBannerCell.swift */; }; B10B3B5C2201DD740072C76B /* KeyBackupBannerCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B10B3B5A2201DD740072C76B /* KeyBackupBannerCell.xib */; }; B1107EC82200B0720038014B /* KeyBackupRecoverSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1107EC72200B0720038014B /* KeyBackupRecoverSuccessViewController.swift */; }; @@ -534,6 +535,7 @@ B1098C0821ED07E4000DDA48 /* NavigationRouter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationRouter.swift; sourceTree = ""; }; B1098C0B21ED07E4000DDA48 /* Presentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Presentable.swift; sourceTree = ""; }; B1098C0C21ED07E4000DDA48 /* NavigationRouterType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationRouterType.swift; sourceTree = ""; }; + B109D6F0222D8C400061B6D9 /* UIApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIApplication.swift; sourceTree = ""; }; B10B3B592201DD740072C76B /* KeyBackupBannerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyBackupBannerCell.swift; sourceTree = ""; }; B10B3B5A2201DD740072C76B /* KeyBackupBannerCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KeyBackupBannerCell.xib; sourceTree = ""; }; B1107EC72200B0720038014B /* KeyBackupRecoverSuccessViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyBackupRecoverSuccessViewController.swift; sourceTree = ""; }; @@ -2854,6 +2856,7 @@ B140B4A121F87F7100E3F5FE /* OperationQueue.swift */, B1E5368821FB1E20001F3AFF /* UIButton.swift */, 3281BCF62201FA4200F4A383 /* UIControl.swift */, + B109D6F0222D8C400061B6D9 /* UIApplication.swift */, ); path = Categories; sourceTree = ""; @@ -3673,6 +3676,7 @@ B1B558CE20EF768F00210D55 /* RoomOutgoingEncryptedAttachmentBubbleCell.m in Sources */, B1B5577D20EE84BF00210D55 /* CircleButton.m in Sources */, 32BF995521FA2AB700698084 /* SettingsKeyBackupViewAction.swift in Sources */, + B109D6F1222D8C400061B6D9 /* UIApplication.swift in Sources */, B1B558FF20EF768F00210D55 /* RoomIncomingTextMsgBubbleCell.m in Sources */, B1098C0021ECFE65000DDA48 /* KeyBackupSetupPassphraseViewController.swift in Sources */, B1B5591020EF782800210D55 /* TableViewCellWithPhoneNumberTextField.m in Sources */, diff --git a/Riot/Categories/UIApplication.swift b/Riot/Categories/UIApplication.swift new file mode 100644 index 000000000..d9fe932d2 --- /dev/null +++ b/Riot/Categories/UIApplication.swift @@ -0,0 +1,38 @@ +/* + Copyright 2019 New Vector Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import Foundation + +extension UIApplication { + @objc func vc_open(_ url: URL, completionHandler completion: ((_ success: Bool) -> Void)? = nil) { + + let application = UIApplication.shared + + guard application.canOpenURL(url) else { + completion?(false) + return + } + + if #available(iOS 10.0, *) { + application.open(url, options: [:], completionHandler: { success in + completion?(false) + }) + } else { + let success = application.openURL(url) + completion?(success) + } + } +} From 96f458b60134ffb341448c0b4ab5b8386d881013 Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 4 Mar 2019 18:20:30 +0100 Subject: [PATCH 40/73] AuthVC: Style the authentication fallback webview screen so that its header matches to navigation bar style --- Riot/Modules/Authentication/AuthenticationViewController.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index b25074b80..906d2313a 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -146,7 +146,10 @@ self.view.backgroundColor = ThemeService.shared.theme.baseColor; self.authenticationScrollView.backgroundColor = ThemeService.shared.theme.backgroundColor; - self.authFallbackContentView.backgroundColor = ThemeService.shared.theme.backgroundColor; + + // Style the authentication fallback webview screen so that its header matches to navigation bar style + self.authFallbackContentView.backgroundColor = ThemeService.shared.theme.baseColor; + self.cancelAuthFallbackButton.tintColor = ThemeService.shared.theme.baseTextPrimaryColor; if (self.homeServerTextField.placeholder) { @@ -516,6 +519,8 @@ { // Do SSO using the fallback URL [self showAuthenticationFallBackView]; + + [ThemeService.shared.theme applyStyleOnNavigationBar:self.navigationController.navigationBar]; } else { From 1f90575afdccad26aa29e73c916300fcb153d899 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Mon, 4 Mar 2019 18:29:13 +0100 Subject: [PATCH 41/73] Handle quick tap on link in RoomViewController. Retrieve URL interaction information when user tap a link in a MXKRoomBubbleTableViewCell to indicate the type of interaction expected with the URL. --- Riot/Assets/en.lproj/Vector.strings | 1 + Riot/Generated/Strings.swift | 4 +++ Riot/Modules/Room/RoomViewController.m | 39 ++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index c328fd026..d5b38c51c 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -240,6 +240,7 @@ "room_many_users_are_typing" = "%@, %@ & others are typing…"; "room_message_placeholder" = "Send a message (unencrypted)…"; "room_message_reply_to_placeholder" = "Send a reply (unencrypted)…"; +"room_message_unable_open_link_error_message" = "Unable to open the link."; "room_do_not_have_permission_to_post" = "You do not have permission to post to this room"; "encrypted_room_message_placeholder" = "Send an encrypted message…"; "encrypted_room_message_reply_to_placeholder" = "Send an encrypted reply…"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index 7322f28f3..2d9e3ef37 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -1434,6 +1434,10 @@ internal enum VectorL10n { internal static var roomMessageShortPlaceholder: String { return VectorL10n.tr("Vector", "room_message_short_placeholder") } + /// Unable to open the link. + internal static var roomMessageUnableOpenLinkErrorMessage: String { + return VectorL10n.tr("Vector", "room_message_unable_open_link_error_message") + } /// %d new message internal static func roomNewMessageNotification(_ p1: Int) -> String { return VectorL10n.tr("Vector", "room_new_message_notification", p1) diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 9eb6616ea..49440b8da 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -2753,6 +2753,8 @@ { // Try to catch universal link supported by the app NSURL *url = userInfo[kMXKRoomBubbleCellUrl]; + // Retrieve the type of interaction expected with the URL (See UITextItemInteraction) + NSNumber *urlItemInteractionValue = userInfo[kMXKRoomBubbleCellUrlItemInteraction]; // When a link refers to a room alias/id, a user id or an event id, the non-ASCII characters (like '#' in room alias) has been escaped // to be able to convert it into a legal URL string. @@ -2831,6 +2833,37 @@ } } } + else if (url && urlItemInteractionValue) + { + // Fallback case for external links + + // TODO: Use UITextItemInteraction enum when minimum deployement target will be iOS 10 + switch (urlItemInteractionValue.integerValue) { + case 0: //UITextItemInteractionInvokeDefaultAction + { + [[UIApplication sharedApplication] vc_open:url completionHandler:^(BOOL success) { + if (!success) + { + [self showUnableToOpenLinkErrorAlert]; + } + }]; + shouldDoAction = NO; + } + break; + case 1: //UITextItemInteractionPresentActions + // Long press on link, let MXKRoomBubbleTableViewCell UITextView present the default contextual menu. + break; + case 2: //UITextItemInteractionPreview + // Force touch on link, let MXKRoomBubbleTableViewCell UITextView use default peek and pop behavior. + break; + default: + break; + } + } + else + { + [self showUnableToOpenLinkErrorAlert]; + } } return shouldDoAction; @@ -2861,6 +2894,12 @@ [self dataSource:self.roomDataSource didCellChange:nil]; } +- (void)showUnableToOpenLinkErrorAlert +{ + [[AppDelegate theDelegate] showAlertWithTitle:[NSBundle mxk_localizedStringForKey:@"error"] + message:NSLocalizedStringFromTable(@"room_message_unable_open_link_error_message", @"Vector", nil)]; +} + #pragma mark - Segues - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender From 15ce38277bdb2c0b3cb5548b83682626a66b5f82 Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 4 Mar 2019 18:38:12 +0100 Subject: [PATCH 42/73] CHANGES --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index e606b7911..b0dc66d73 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,7 @@ Improvements: * Fastlane: Update to Xcode 10.1 (#2202). * Use SwiftLint to enforce Swift style and conventions (PR #2300). * Fix SWIFT_VERSION configuration in post install hook of Podfile (PR #2302). + * Authentication: support SSO by using the fallback URL (#2307). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). From 449641170f53eb1ae138a097c185527621b6fb26 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Mon, 4 Mar 2019 18:39:28 +0100 Subject: [PATCH 43/73] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index e606b7911..39ec92887 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -15,6 +15,7 @@ Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). * Reskin: Text in badges should be white in dark theme (#2283). * Crash in Settings in 0.8.1 (#2295). + * Quickly tapping on a URL in a message highlights the message rather than opening the URL (#728). Changes in 0.8.1 (2019-02-19) =============================================== From 54ee0e8df35781c9c34f50a6d373f869f78a5b9a Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 4 Mar 2019 19:06:14 +0100 Subject: [PATCH 44/73] Update Riot/Categories/UIApplication.swift Co-Authored-By: SBiOSoftWhare --- Riot/Categories/UIApplication.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Categories/UIApplication.swift b/Riot/Categories/UIApplication.swift index d9fe932d2..ff16ad049 100644 --- a/Riot/Categories/UIApplication.swift +++ b/Riot/Categories/UIApplication.swift @@ -28,7 +28,7 @@ extension UIApplication { if #available(iOS 10.0, *) { application.open(url, options: [:], completionHandler: { success in - completion?(false) + completion?(success) }) } else { let success = application.openURL(url) From 16cd24074469d8310c6eb4cb5f04f9a280d2a858 Mon Sep 17 00:00:00 2001 From: pogback Date: Sun, 3 Mar 2019 06:08:19 +0000 Subject: [PATCH 45/73] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (615 of 615 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/zh_Hans/ --- Riot/Assets/zh_Hans.lproj/Vector.strings | 152 +++++++++++++++++++++-- 1 file changed, 142 insertions(+), 10 deletions(-) diff --git a/Riot/Assets/zh_Hans.lproj/Vector.strings b/Riot/Assets/zh_Hans.lproj/Vector.strings index d4a91bb8a..cd655a2c6 100644 --- a/Riot/Assets/zh_Hans.lproj/Vector.strings +++ b/Riot/Assets/zh_Hans.lproj/Vector.strings @@ -79,7 +79,7 @@ "auth_reset_password_success_message" = "您的密码已重置。\n\n您的所有设备都会被登出并且不会收到推送通知。要想重新收到通知,请在每个设备上重新登录。"; "auth_add_email_and_phone_warning" = "在 API 出现之前,还不支持使用邮箱地址或手机号码直接注册。只有手机号码会和此账户绑定。您可以在设置中添加邮箱地址。"; // Chat creation -"room_creation_title" = "创建聊天"; +"room_creation_title" = "新的聊天"; "room_creation_account" = "账户"; "room_creation_appearance" = "外观"; "room_creation_appearance_name" = "名称"; @@ -174,7 +174,7 @@ "room_participants_action_set_default_power_level" = "重置到正常用户"; "room_participants_action_set_moderator" = "使其成为主持人"; "room_participants_action_set_admin" = "使其成为管理员"; -"room_participants_action_start_new_chat" = "开始新聊天"; +"room_participants_action_start_new_chat" = "发起新的聊天"; "room_participants_action_start_voice_call" = "开始语音通话"; "room_participants_action_start_video_call" = "开始视频通话"; "room_participants_action_mention" = "提及"; @@ -198,7 +198,7 @@ "room_delete_unsent_messages" = "删除未发送消息"; "room_event_action_copy" = "复制"; "room_event_action_quote" = "引用"; -"room_event_action_redact" = "撤回"; +"room_event_action_redact" = "移除"; "room_event_action_more" = "移动"; "room_event_action_share" = "分享"; "room_event_action_permalink" = "永久链接"; @@ -254,7 +254,7 @@ "settings_cryptography" = "加密"; "settings_sign_out" = "注销"; "settings_sign_out_confirmation" = "你确定?"; -"settings_sign_out_e2e_warn" = "您将丢失所有端对端加密密钥。这就意味着在您的设备上将无法阅读已加密的消息。"; +"settings_sign_out_e2e_warn" = "您将丢失所有端对端加密密钥。这意味着在此设备上您将再也无法阅读已加密聊天室里的旧消息。"; "settings_profile_picture" = "档案图片"; "settings_display_name" = "显示名"; "settings_first_name" = "名称"; @@ -465,7 +465,7 @@ "group_participants_invite_prompt_msg" = "你确定要邀请 %@ 加入此群组吗?"; "group_participants_filter_members" = "过滤社区成员"; "group_participants_invite_another_user" = "按照用户 ID 或昵称搜索/邀请用户"; -"group_participants_invite_malformed_id_title" = "邀请时出现错误"; +"group_participants_invite_malformed_id_title" = "邀请出错"; "group_participants_invited_section" = "已邀请"; // Group rooms "group_rooms_filter_rooms" = "过滤社区聊天室"; @@ -510,7 +510,7 @@ "settings_labs_room_members_lazy_loading" = "延迟加载聊天室成员"; "settings_labs_room_members_lazy_loading_error_message" = "您的主服务器尚不支持延迟加载聊天室成员。请稍后再试。"; "settings_deactivate_my_account" = "注销我的账户"; -"event_formatter_jitsi_widget_added" = ""; +"event_formatter_jitsi_widget_added" = "VoIP 会议已被 %@ 添加"; "event_formatter_rerequest_keys_part1_link" = "重新请求加密密钥"; "event_formatter_rerequest_keys_part2" = " (从您的其他设备中)。"; "homeserver_connection_lost" = "无法连接至主服务器。"; @@ -522,9 +522,141 @@ "rerequest_keys_alert_title" = "请求已发送"; "settings_callkit_info" = "在您的锁屏界面接听 Riot 来电。在系统通话记录中显示 Riot 通话记录。若您已启用 iCloud,通话记录将会与 Apple 共享。"; "room_replacement_link" = "对话自此继续。"; -"room_predecessor_information" = "本聊天室延续了另一对话。"; -"room_predecessor_link" = "点击查看更早消息。"; -"room_resource_usage_limit_reached_message_1_default" = "此主服务器已超出某一资源使用限制,导致 "; +"room_predecessor_information" = "这个聊天室是另一个对话的延续。"; +"room_predecessor_link" = "点击此处查看更早的消息。"; +"room_resource_usage_limit_reached_message_1_default" = "此主服务器某资源已超出使用限制,导致 "; "room_resource_usage_limit_reached_message_1_monthly_active_user" = "此主服务器已达到月活跃用户限制,导致 "; "room_resource_usage_limit_reached_message_2" = "部分用户将无法登录。"; -"room_resource_usage_limit_reached_message_contact_3" = " 若想提高限制。"; +"room_resource_usage_limit_reached_message_contact_3" = " 以提高限制。"; +// String for App Store +"store_short_description" = "安全、去中心化的聊天及 VoIP 应用"; +"store_full_description" = "沟通,由你掌控。\n\n一个聊天应用,由你掌控且完全灵活。Riot 让你以你的方式沟通。为 [matrix] - 开放、去中心化的沟通而打造。\n\n获取一个免费的 matrix.org 账号,在 https://modular.im 获取一个你自己的服务器,或者使用其他 Matrix 服务器。\n\n为什么选择 Riot.im?\n\n完整的沟通:围绕你的团队、你的朋友、你的社区创建聊天室 - 随你喜欢!聊天、分享文件、添加插件和语音视频通话 - 全部免费。\n\n强大的集成度:通过你了解和喜欢的工具来使用 Riot.im 。你甚至可以在 Riot.im 上与其他聊天应用的用户和群组聊天。\n\n隐私和安全:保守你对话的秘密。最先进的端到端加密技术可确保私密通信保持私密性。\n\n开放,而非封闭:开源,基于 Matrix。通过自己开设的服务器来拥有你自己的数据,或者选择你信赖的服务器。\n\n随处可及:在你所有的设备和线上页面 https://riot.im 上通过完整的历史信息同步让你随处可及。"; +"auth_accept_policies" = "请查看并接受此主页服务器的服务条款:"; +"room_replacement_information" = "这个聊天室已被替换,不再有效。"; +"settings_flair" = "在允许的地方显示个性徽章"; +"settings_key_backup" = "密钥备份"; +"settings_key_backup_info" = "消息已被端对端安全加密。只有您和持有密钥的接收方可以阅读这些消息。"; +"settings_key_backup_info_checking" = "检查中 ..."; +"settings_key_backup_info_none" = "您的密钥未从此设备备份。"; +"settings_key_backup_info_signout_warning" = "在登出账号之前备份密钥以免丢失密钥。"; +"settings_key_backup_info_version" = "密钥备份版本:%@"; +"settings_key_backup_info_algorithm" = "算法:%@"; +"settings_key_backup_info_valid" = "此设备已备份密钥。"; +"settings_key_backup_info_not_valid" = "此设备未备份密钥。"; +"settings_key_backup_info_progress" = "%@ 个密钥备份中 ..."; +"settings_key_backup_info_progress_done" = "所有密钥都已备份"; +"settings_key_backup_info_trust_signature_unknown" = "备份具有一个 ID:%@ 的设备的签名"; +"settings_key_backup_info_trust_signature_valid" = "备份具有此设备的一个有效签名"; +"settings_key_backup_info_trust_signature_valid_device_verified" = "备份具有来自 %@ 的有效签名"; +"settings_key_backup_info_trust_signature_valid_device_unverified" = "备份具有来自 %@ 的签名"; +"settings_key_backup_info_trust_signature_invalid_device_verified" = "备份具有来自 %@ 的无效签名"; +"settings_key_backup_info_trust_signature_invalid_device_unverified" = "备份具有来自 %@ 的无效签名"; +"settings_key_backup_button_create" = "开始使用密钥备份"; +"settings_key_backup_button_restore" = "从备份恢复"; +"settings_key_backup_button_delete" = "删除备份"; +"settings_key_backup_button_use" = "使用密钥备份"; +"settings_key_backup_delete_confirmation_prompt_title" = "删除备份"; +"settings_key_backup_delete_confirmation_prompt_msg" = "您确定吗?如果您的密钥未正确备份,您将丢失您的已加密信息。"; +"room_details_flair_section" = "显示社区徽章"; +"room_details_fail_to_update_room_direct" = "此聊天室的直接标记更新失败"; +"event_formatter_jitsi_widget_removed" = "VoIP 会议已被 %@ 移除"; +"room_does_not_exist" = "%@ 聊天室不存在"; +"call_incoming_voice" = "来电 ..."; +"call_incoming_video" = "视频通话来电 ..."; +// Key backup wrong version +"e2e_key_backup_wrong_version_title" = "新建密钥备份"; +"e2e_key_backup_wrong_version" = "一个新的安全消息密钥备份已被删除。\n\n如果这不是您的操作,请在设置中设定一个新的密码。"; +"e2e_key_backup_wrong_version_button_settings" = "设置"; +"e2e_key_backup_wrong_version_button_wasme" = "那是我操作的"; +"widget_sticker_picker_no_stickerpacks_alert" = "您目前并未启用任何贴纸包。"; +"widget_sticker_picker_no_stickerpacks_alert_add_now" = "要立即添加吗?"; +"widget_integration_no_permission_in_room" = "您在这个聊天室中没有此操作的权限。"; +"widget_integration_missing_room_id" = "请求中缺少 room_id 。"; +"widget_integration_missing_user_id" = "请求中缺少 user_id 。"; +"widget_integration_room_not_visible" = "%@ 聊天室不可见。"; +// Share extension +"share_extension_auth_prompt" = "登录主应用程序以共享内容"; +"share_extension_failed_to_encrypt" = "发送失败。 请在主应用程序中检查此房间的加密设置"; +"e2e_room_key_request_message_new_device" = "您添加了一个新设备 '%@' ,它正在请求加密密钥。"; +"e2e_room_key_request_message" = "您的未验证设备 '%@' 正在请求加密密钥。"; +// GDPR +"gdpr_consent_not_given_alert_message" = "要继续使用该 %@ 主服务器,您必须查看并同意其服务条款和条件。"; +"gdpr_consent_not_given_alert_review_now_action" = "立即查看"; +"deactivate_account_title" = "注销账户"; +"deactivate_account_informations_part1" = "这将使您的账号永久无法使用。 您将无法登录,也无法重新注册相同的用户 ID 。 这将导致您的账号离开其参与的所有聊天室,并且会从您的身份服务器中删除您的账号详细信息。 "; +"deactivate_account_informations_part2_emphasize" = "此项操作无法逆转。"; +"deactivate_account_informations_part3" = "\n\n正在注销您的账号 "; +"deactivate_account_informations_part4_emphasize" = "默认情况下不会导致我们忘记您发送的消息。 "; +"deactivate_account_informations_part5" = "如果您希望我们忘记您的消息,请勾选下面的框\n\nMatrix中的消息可见性与电子邮件类似。 我们忘记您的消息意味着您已发送的消息将不会再与任何新用户或未注册用户共享,但已有权访问这些消息的注册用户仍可访问其副本。"; +"deactivate_account_forget_messages_information_part1" = "当我的账号注销时请忘记我所有的已发送消息("; +"deactivate_account_forget_messages_information_part3" = ": 这会导致将来加入的用户看到的是一段不完整的对话)"; +"deactivate_account_password_alert_message" = "要继续,请输入您的密码"; +"rerequest_keys_alert_message" = "请在另一台可以解密消息的设备上启动 Riot ,以便将密钥发送到此设备。"; +"key_backup_setup_title" = "密钥备份"; +"key_backup_setup_skip_alert_title" = "您确定吗?"; +"key_backup_setup_skip_alert_message" = "如果您退出或丢失设备,可能会丢失安全消息。"; +"key_backup_setup_skip_alert_skip_action" = "跳过"; +"key_backup_setup_intro_title" = "永不丢失加密消息"; +"key_backup_setup_intro_info" = "加密聊天室中的消息使用端到端加密进行保护。 只有您和拥有密钥的收件人才能阅读这些消息。\n\n安全备份密钥以避免丢失密钥。"; +"key_backup_setup_intro_setup_action_without_existing_backup" = "开始使用密钥备份"; +"key_backup_setup_intro_setup_action_with_existing_backup" = "使用密钥备份"; +"key_backup_setup_intro_manual_export_info" = "(高级)"; +"key_backup_setup_intro_manual_export_action" = "手动导出密钥"; +"key_backup_setup_passphrase_title" = "使用一段密码保护您的备份"; +"key_backup_setup_passphrase_info" = "我们将会在主服务器上保存一份您的密钥的加密拷贝。设置一个密码来保护您的备份的安全。\n\n为了最大的安全性,这个密码应当与您的账号密码不同。"; +"key_backup_setup_passphrase_passphrase_title" = "输入"; +"key_backup_setup_passphrase_passphrase_placeholder" = "输入密码"; +"key_backup_setup_passphrase_passphrase_valid" = "太棒了!"; +"key_backup_setup_passphrase_passphrase_invalid" = "尝试添加一个字符"; +"key_backup_setup_passphrase_confirm_passphrase_title" = "确认"; +"key_backup_setup_passphrase_confirm_passphrase_placeholder" = "确认密码"; +"key_backup_setup_passphrase_confirm_passphrase_valid" = "太棒了!"; +"key_backup_setup_passphrase_confirm_passphrase_invalid" = "密码不匹配"; +"key_backup_setup_passphrase_set_passphrase_action" = "设置密码"; +"key_backup_setup_passphrase_setup_recovery_key_info" = "或者使用恢复密钥来保护您的备份,将密钥保存在一个安全的地方。"; +"key_backup_setup_passphrase_setup_recovery_key_action" = "(高级)设置恢复密钥"; +"key_backup_setup_success_title" = "成功!"; +// Success from passphrase +"key_backup_setup_success_from_passphrase_info" = "您的密钥已备份。\n\n您的恢复密钥是一张安全网 - 如果您忘记了密码您可以利用它重获您的已加密信息的访问权。\n\n请将您的恢复密钥保存在一个非常安全的地方,比如密码管理器中 (或保险箱里)。"; +"key_backup_setup_success_from_passphrase_save_recovery_key_action" = "保存恢复密钥"; +"key_backup_setup_success_from_passphrase_done_action" = "完成"; +// Success from recovery key +"key_backup_setup_success_from_recovery_key_info" = "您的密钥已备份。\n\n制作此恢复密钥的副本并确保其安全。"; +"key_backup_setup_success_from_recovery_key_recovery_key_title" = "恢复密钥"; +"key_backup_setup_success_from_recovery_key_make_copy_action" = "制作副本"; +"key_backup_setup_success_from_recovery_key_made_copy_action" = "我已制作一份副本"; +"key_backup_recover_title" = "安全消息"; +"key_backup_recover_invalid_passphrase_title" = "恢复密码不正确"; +"key_backup_recover_invalid_passphrase" = "备份无法用此密码解密:请检查您输入的恢复密码是否正确。"; +"key_backup_recover_invalid_recovery_key_title" = "恢复密钥不匹配"; +"key_backup_recover_invalid_recovery_key" = "备份无法用此密钥解密:请检查您输入的恢复密钥是否正确。"; +"key_backup_recover_from_passphrase_info" = "使用恢复密钥解锁您的安全消息历史"; +"key_backup_recover_from_passphrase_passphrase_title" = "输入"; +"key_backup_recover_from_passphrase_passphrase_placeholder" = "输入密码"; +"key_backup_recover_from_passphrase_recover_action" = "解锁历史"; +"key_backup_recover_from_passphrase_lost_passphrase_action_part1" = "忘记了您的恢复密码?您可以 "; +"key_backup_recover_from_passphrase_lost_passphrase_action_part2" = "使用恢复密钥"; +"key_backup_recover_from_passphrase_lost_passphrase_action_part3" = "。"; +"key_backup_recover_from_recovery_key_info" = "使用恢复密钥解锁您的安全消息历史"; +"key_backup_recover_from_recovery_key_recovery_key_title" = "输入"; +"key_backup_recover_from_recovery_key_recovery_key_placeholder" = "输入恢复密钥"; +"key_backup_recover_from_recovery_key_recover_action" = "解锁历史"; +"key_backup_recover_from_recovery_key_lost_recovery_key_action" = "丢失了恢复密钥?您可以在设置中新设一个。"; +"key_backup_recover_success_info" = "备份已恢复!"; +"key_backup_recover_done_action" = "完成"; +"key_backup_setup_banner_title" = "永不丢失加密消息"; +"key_backup_setup_banner_subtitle" = "开始使用密钥备份"; +"key_backup_recover_banner_title" = "永不丢失加密消息"; +"key_backup_recover_banner_subtitle" = "使用密钥备份"; +"sign_out_existing_key_backup_alert_title" = "您确定要登出账号吗?"; +"sign_out_existing_key_backup_alert_sign_out_action" = "登出"; +"sign_out_non_existing_key_backup_alert_title" = "如果您此时登出账号,您将会失去已加密消息的访问权"; +"sign_out_non_existing_key_backup_alert_setup_key_backup_action" = "开始使用密钥备份"; +"sign_out_non_existing_key_backup_alert_discard_key_backup_action" = "我不想要我的已加密消息了"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_title" = "您将会丢失您的已加密消息"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_message" = "如果您在登出账号之前不备份您的密钥,您将会失去已加密消息的访问权。"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_sign_out_action" = "登出"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_backup_action" = "备份"; +"sign_out_key_backup_in_progress_alert_title" = "密钥备份进行中。如果您此时登出账号将会失去已加密消息的访问权。"; +"sign_out_key_backup_in_progress_alert_discard_key_backup_action" = "我不想要我的已加密消息了"; +"sign_out_key_backup_in_progress_alert_cancel_action" = "等待"; From 5cf40dddbf1abaf671c50d63f7ffcddb28363592 Mon Sep 17 00:00:00 2001 From: Victor Grousset Date: Mon, 4 Mar 2019 18:19:48 +0000 Subject: [PATCH 46/73] Translated using Weblate (Esperanto) Currently translated at 0.6% (4 of 615 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/eo/ --- Riot/Assets/eo.lproj/Vector.strings | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Riot/Assets/eo.lproj/Vector.strings b/Riot/Assets/eo.lproj/Vector.strings index 8b1378917..72b237636 100644 --- a/Riot/Assets/eo.lproj/Vector.strings +++ b/Riot/Assets/eo.lproj/Vector.strings @@ -1 +1,4 @@ - +"room_message_reply_to_placeholder" = "Sendi respondon (neĉifritan)…"; +"encrypted_room_message_reply_to_placeholder" = "Sendi ĉifritan respondon…"; +"room_message_short_placeholder" = "Sendi mesaĝon…"; +"room_message_reply_to_short_placeholder" = "Sendi respondon…"; From 6eb4b548e4cfb71da7c3f79d10b10faaeaef382a Mon Sep 17 00:00:00 2001 From: Szimszon Date: Sun, 3 Mar 2019 15:59:01 +0000 Subject: [PATCH 47/73] Translated using Weblate (Hungarian) Currently translated at 100.0% (4 of 4 strings) Translation: Riot iOS/Riot iOS (Dialogs) Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios-dialogs/hu/ --- Riot/Assets/hu.lproj/InfoPlist.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Assets/hu.lproj/InfoPlist.strings b/Riot/Assets/hu.lproj/InfoPlist.strings index b72a7f09f..9413c4955 100644 --- a/Riot/Assets/hu.lproj/InfoPlist.strings +++ b/Riot/Assets/hu.lproj/InfoPlist.strings @@ -2,4 +2,4 @@ "NSCameraUsageDescription" = "A kamera fényképek, videók készítéséhez és videóhívásokhoz lesz használva."; "NSPhotoLibraryUsageDescription" = "A fénykép galéria fényképek és videók küldéséhez lesz használva."; "NSMicrophoneUsageDescription" = "A mikrofon videók készítéséhez és hívásokhoz lesz használva."; -"NSContactsUsageDescription" = "Ahhoz, hogy meg tudjuk mutatni melyik ismerősöd használja már a Riot-ot vagy Matrix-ot, el tudjuk küldeni az e-mail címeket és telefonszámokat a címjegyzékedből a Matrix Azonosítási Szerverének. „New Vector” nem tárolja és semmilyen más célra nem használja ezeket az információkat. További információkér olvasd el az adatkezelési oldalt az alkalmazás beállításaiban."; +"NSContactsUsageDescription" = "Ahhoz, hogy meg tudjuk mutatni melyik ismerősöd használja már a Riot-ot vagy Matrix-ot, el tudjuk küldeni az e-mail címeket és telefonszámokat a címjegyzékedből a Matrix Azonosítási Szerverének. „New Vector” nem tárolja és semmilyen más célra nem használja ezeket az információkat. További információkért olvasd el az adatkezelési oldalt az alkalmazás beállításaiban."; From 17f7eba1b8e2f0117edf6091f1e1d59e7a7d8d8a Mon Sep 17 00:00:00 2001 From: Szimszon Date: Sun, 3 Mar 2019 15:59:53 +0000 Subject: [PATCH 48/73] Translated using Weblate (Hungarian) Currently translated at 98.5% (606 of 615 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/hu/ --- Riot/Assets/hu.lproj/Vector.strings | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Riot/Assets/hu.lproj/Vector.strings b/Riot/Assets/hu.lproj/Vector.strings index 7a403aa24..3cc0e577c 100644 --- a/Riot/Assets/hu.lproj/Vector.strings +++ b/Riot/Assets/hu.lproj/Vector.strings @@ -87,7 +87,7 @@ "auth_reset_password_email_validation_message" = "Az e-mailt elküldtük a %@ címre. Ha rákattintottál a linkre ami benne van utána kattints ide."; "auth_reset_password_next_step_button" = "Ellenőriztem az e-mail címet"; "auth_reset_password_error_unauthorized" = "E-mail cím ellenőrzése nem sikerült: bizonyosodj meg róla, hogy az e-mailben lévő linkre rákattintottál"; -"auth_reset_password_error_not_found" = "Úgy tűnik az e-mail címed nincs összekötve a matrix azonosítóddal a Matrix szerveren."; +"auth_reset_password_error_not_found" = "Úgy tűnik az e-mail címed nincs összekötve a Matrix azonosítóddal a Matrix szerveren."; "auth_reset_password_success_message" = "Visszaállítottuk a jelszavad.\n\nKijelentkeztettünk minden eszközödből és nem kapsz értesítéseket sem. Az értesítések újra engedélyezéséhez jelentkezz be újra az eszközökön."; // Chat creation "room_creation_title" = "Új csevegés"; @@ -674,3 +674,5 @@ "e2e_key_backup_wrong_version_button_wasme" = "Én voltam"; "key_backup_setup_intro_manual_export_info" = "(Haladó)"; "key_backup_setup_intro_manual_export_action" = "Kulcsok kimentése kézzel"; +// String for App Store +"store_short_description" = "Biztonságos elosztott csevegés/VoIP"; From b8a17869fc7823505111b5ca8131d928f78c8df2 Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 5 Mar 2019 12:44:37 +0100 Subject: [PATCH 49/73] CHANGES --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index dea92c4e5..43b39fc40 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -18,6 +18,7 @@ Bug fix: * Reskin: HomeVC: use notices colors for badges background in section headers (#2292). * Crash in Settings in 0.8.1 (#2295). * Quickly tapping on a URL in a message highlights the message rather than opening the URL (#728). + * 3D touching a link can lock the app (#1818). Changes in 0.8.1 (2019-02-19) =============================================== From 9c7103ee0ff57197ad1c0daad22ce5be2a077550 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Tue, 5 Mar 2019 15:35:39 +0100 Subject: [PATCH 50/73] Do not present key backup banner on HomeVIewController if there are no keys to backup --- Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m index 68b492874..8f17b3f77 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m @@ -175,8 +175,8 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou - (BOOL)updateKeyBackupBanner { KeyBackupBanner keyBackupBanner = KeyBackupBannerNone; - - if (self.recentsDataSourceMode == RecentsDataSourceModeHome) + + if (self.recentsDataSourceMode == RecentsDataSourceModeHome && self.mxSession.crypto.backup.hasKeysToBackup) { KeyBackupBannerPreferences *keyBackupBannersPreferences = KeyBackupBannerPreferences.shared; From 2a80a2ee04cce105f1ad559d0df9469ca6278486 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Tue, 5 Mar 2019 15:53:58 +0100 Subject: [PATCH 51/73] Do not mention key backup on sign out when there is no keys to backup --- Riot/Modules/Settings/SettingsViewController.m | 13 +++++++------ .../Settings/SignOut/SignOutAlertPresenter.swift | 12 +++++++++++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 3ea8338fe..194d91243 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -2711,12 +2711,13 @@ SignOutAlertPresenterDelegate> { self.signOutButton = (UIButton*)sender; - MXKeyBackupState backupState = self.mainSession.crypto.backup.state; - [self.signOutAlertPresenter - presentFor:backupState - from:self - sourceView:self.signOutButton - animated:YES]; + MXKeyBackup *keyBackup = self.mainSession.crypto.backup; + + [self.signOutAlertPresenter presentFor:keyBackup.state + areThereKeysToBackup:keyBackup.hasKeysToBackup + from:self + sourceView:self.signOutButton + animated:YES]; } - (void)onRemove3PID:(NSIndexPath*)path diff --git a/Riot/Modules/Settings/SignOut/SignOutAlertPresenter.swift b/Riot/Modules/Settings/SignOut/SignOutAlertPresenter.swift index a29a8bc5a..83bfa03f2 100644 --- a/Riot/Modules/Settings/SignOut/SignOutAlertPresenter.swift +++ b/Riot/Modules/Settings/SignOut/SignOutAlertPresenter.swift @@ -37,9 +37,19 @@ final class SignOutAlertPresenter: NSObject { // MARK: - Public - func present(for keyBackupState: MXKeyBackupState, from viewController: UIViewController, sourceView: UIView?, animated: Bool) { + func present(for keyBackupState: MXKeyBackupState, + areThereKeysToBackup: Bool, + from viewController: UIViewController, + sourceView: UIView?, + animated: Bool) { self.sourceView = sourceView self.presentingViewController = viewController + + guard areThereKeysToBackup else { + // If there is no keys to backup do not mention key backup and present same alert as if we had an existing backup. + self.presentExistingBackupAlert(animated: animated) + return + } switch keyBackupState { case MXKeyBackupStateUnknown, MXKeyBackupStateDisabled, MXKeyBackupStateCheckingBackUpOnHomeserver: From c84eafb1a4010656493af7a4c924fff4786db5c5 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Tue, 5 Mar 2019 15:55:39 +0100 Subject: [PATCH 52/73] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index dea92c4e5..506e629fe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -18,6 +18,7 @@ Bug fix: * Reskin: HomeVC: use notices colors for badges background in section headers (#2292). * Crash in Settings in 0.8.1 (#2295). * Quickly tapping on a URL in a message highlights the message rather than opening the URL (#728). + * Do not display key backup UI if the user has no e2e rooms (#2304). Changes in 0.8.1 (2019-02-19) =============================================== From 616f8571c06e891f70c2e48620ab31d092dece0b Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 6 Mar 2019 18:30:03 +0100 Subject: [PATCH 53/73] Authentication: .well-known support (#2117). --- CHANGES.rst | 1 + Riot/Assets/en.lproj/Vector.strings | 3 +- Riot/Generated/Strings.swift | 6 +- .../AuthenticationViewController.m | 110 ++++++++++++++++++ .../Authentication/Views/AuthInputsView.m | 15 +++ 5 files changed, 133 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 36acf43d1..4ca1beb12 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,7 @@ Improvements: * Use SwiftLint to enforce Swift style and conventions (PR #2300). * Fix SWIFT_VERSION configuration in post install hook of Podfile (PR #2302). * Authentication: support SSO by using the fallback URL (#2307). + * Authentication: .well-known support (#2117). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 700e7f9f2..81ca9d9fa 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -113,6 +113,7 @@ "auth_reset_password_success_message" = "Your password has been reset.\n\nYou have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, re-log in on each device."; "auth_add_email_and_phone_warning" = "Registration with email and phone number at once is not supported yet until the api exists. Only the phone number will be taken into account. You may add your email to your profile in settings."; "auth_accept_policies" = "Please review and accept the policies of this homeserver:"; +"auth_autodiscover_invalid_response" = "Invalid homeserver discovery response"; // Chat creation "room_creation_title" = "New Chat"; @@ -313,7 +314,7 @@ // Room Preview "room_preview_invitation_format" = "You have been invited to join this room by %@"; "room_preview_subtitle" = "This is a preview of this room. Room interactions have been disabled."; -"room_preview_unlinked_email_warning" = "This invitation was sent to %@, which is not associated with this account. You may wish to login with a different account, or add this email to your this account."; +"room_preview_unlinked_email_warning" = "This invitation was sent to %@, which is not associated with this account. You may wish to login with a different account, or add this email to your account."; "room_preview_try_join_an_unknown_room" = "You are trying to access %@. Would you like to join in order to participate in the discussion?"; "room_preview_try_join_an_unknown_room_default" = "a room"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index e112ea3ad..846f237d3 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -50,6 +50,10 @@ internal enum VectorL10n { internal static var authAddPhoneMessage: String { return VectorL10n.tr("Vector", "auth_add_phone_message") } + /// Invalid homeserver discovery response + internal static var authAutodiscoverInvalidResponse: String { + return VectorL10n.tr("Vector", "auth_autodiscover_invalid_response") + } /// This email address is already in use internal static var authEmailInUse: String { return VectorL10n.tr("Vector", "auth_email_in_use") @@ -1654,7 +1658,7 @@ internal enum VectorL10n { internal static var roomPreviewTryJoinAnUnknownRoomDefault: String { return VectorL10n.tr("Vector", "room_preview_try_join_an_unknown_room_default") } - /// This invitation was sent to %@, which is not associated with this account. You may wish to login with a different account, or add this email to your this account. + /// This invitation was sent to %@, which is not associated with this account. You may wish to login with a different account, or add this email to your account. internal static func roomPreviewUnlinkedEmailWarning(_ p1: String) -> String { return VectorL10n.tr("Vector", "room_preview_unlinked_email_warning", p1) } diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index 906d2313a..10cb92073 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -869,4 +869,114 @@ [self cancel]; } +- (void)authInputsView:(MXKAuthInputsView *)authInputsView autoDiscoverServerWithDomain:(NSString *)domain +{ + [self tryServerDiscoveryOnDomain:domain]; +} + +#pragma mark - Server discovery + +- (void)tryServerDiscoveryOnDomain:(NSString *)domain +{ + MXAutoDiscovery *autoDiscovery = [[MXAutoDiscovery alloc] initWithDomain:domain]; + + MXWeakify(self); + [autoDiscovery findClientConfig:^(MXDiscoveredClientConfig * _Nonnull discoveredClientConfig) { + MXStrongifyAndReturnIfNil(self); + + switch (discoveredClientConfig.action) + { + case MXDiscoveredClientConfigActionPrompt: + [self customiseServersWithWellKnown:discoveredClientConfig.wellKnown]; + break; + + case MXDiscoveredClientConfigActionFailPrompt: + case MXDiscoveredClientConfigActionFailError: + { + // Alert user + if (self->alert) + { + [self->alert dismissViewControllerAnimated:NO completion:nil]; + } + + self->alert = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"auth_autodiscover_invalid_response", @"Vector", nil) + message:nil + preferredStyle:UIAlertControllerStyleAlert]; + + [self->alert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"ok"] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + self->alert = nil; + }]]; + + [self presentViewController:self->alert animated:YES completion:nil]; + + break; + } + + default: + // Fail silently + break; + } + + } failure:^(NSError * _Nonnull error) { + // Fail silently + }]; +} + +- (void)customiseServersWithWellKnown:(MXWellKnown*)wellKnown +{ + if (self.customServersContainer.hidden) + { + // Check wellKnown data with application default servers + // If different, use custom servers + if (![self.defaultHomeServerUrl isEqualToString:wellKnown.homeServer.baseUrl] + || ![self.defaultIdentityServerUrl isEqualToString:wellKnown.identityServer.baseUrl]) + { + [self showCustomHomeserver:wellKnown.homeServer.baseUrl andIdentityServer:wellKnown.identityServer.baseUrl]; + } + } + else + { + if ([self.defaultHomeServerUrl isEqualToString:wellKnown.homeServer.baseUrl] + && [self.defaultIdentityServerUrl isEqualToString:wellKnown.identityServer.baseUrl]) + { + // wellKnown matches with application default servers + // Hide custom servers + [self hideCustomServers:YES]; + } + else + { + NSString *customHomeServerURL = [[NSUserDefaults standardUserDefaults] objectForKey:@"customHomeServerURL"]; + NSString *customIdentityServerURL = [[NSUserDefaults standardUserDefaults] objectForKey:@"customIdentityServerURL"]; + + if (![customHomeServerURL isEqualToString:wellKnown.homeServer.baseUrl] + || ![customIdentityServerURL isEqualToString:wellKnown.identityServer.baseUrl]) + { + // Update custom servers + [self showCustomHomeserver:wellKnown.homeServer.baseUrl andIdentityServer:wellKnown.identityServer.baseUrl]; + } + } + } +} + +- (void)showCustomHomeserver:(NSString*)homeserver andIdentityServer:(NSString*)identityServer +{ + // Store the wellknown data into NSUserDefaults before displaying them + [[NSUserDefaults standardUserDefaults] setObject:homeserver forKey:@"customHomeServerURL"]; + + if (identityServer) + { + [[NSUserDefaults standardUserDefaults] setObject:identityServer forKey:@"customIdentityServerURL"]; + } + else + { + [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"customIdentityServerURL"]; + } + + // And show custom servers + [self hideCustomServers:NO]; +} + @end diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.m b/Riot/Modules/Authentication/Views/AuthInputsView.m index 9882427c5..5d936479b 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.m +++ b/Riot/Modules/Authentication/Views/AuthInputsView.m @@ -1203,6 +1203,21 @@ #pragma mark - UITextField delegate +- (void)textFieldDidEndEditing:(UITextField*)textField +{ + if (textField == self.userLoginTextField && type == MXKAuthenticationTypeLogin) + { + if ([MXTools isMatrixUserIdentifier:self.userLoginTextField.text]) + { + if (self.delegate && [self.delegate respondsToSelector:@selector(authInputsView:autoDiscoverServerWithDomain:)]) + { + NSString *domain = [self.userLoginTextField.text componentsSeparatedByString:@":"][1]; + [self.delegate authInputsView:self autoDiscoverServerWithDomain:domain]; + } + } + } +} + - (BOOL)textFieldShouldReturn:(UITextField*)textField { if (textField.returnKeyType == UIReturnKeyDone) From 20dd5a5f03c8512aff707e1f00714a6806ea1743 Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 7 Mar 2019 10:08:39 +0100 Subject: [PATCH 54/73] Authentication: .well-known support Fix Steve's remark --- .../Authentication/AuthenticationViewController.m | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Riot/Modules/Authentication/AuthenticationViewController.m b/Riot/Modules/Authentication/AuthenticationViewController.m index 10cb92073..fb73984d6 100644 --- a/Riot/Modules/Authentication/AuthenticationViewController.m +++ b/Riot/Modules/Authentication/AuthenticationViewController.m @@ -40,6 +40,11 @@ Observe kThemeServiceDidChangeThemeNotification to handle user interface theme change. */ id kThemeServiceDidChangeThemeNotificationObserver; + + /** + Server discovery. + */ + MXAutoDiscovery *autoDiscovery; } @end @@ -235,6 +240,8 @@ [[NSNotificationCenter defaultCenter] removeObserver:kThemeServiceDidChangeThemeNotificationObserver]; kThemeServiceDidChangeThemeNotificationObserver = nil; } + + autoDiscovery = nil; } - (void)setAuthType:(MXKAuthenticationType)authType @@ -878,12 +885,14 @@ - (void)tryServerDiscoveryOnDomain:(NSString *)domain { - MXAutoDiscovery *autoDiscovery = [[MXAutoDiscovery alloc] initWithDomain:domain]; + autoDiscovery = [[MXAutoDiscovery alloc] initWithDomain:domain]; MXWeakify(self); [autoDiscovery findClientConfig:^(MXDiscoveredClientConfig * _Nonnull discoveredClientConfig) { MXStrongifyAndReturnIfNil(self); + self->autoDiscovery = nil; + switch (discoveredClientConfig.action) { case MXDiscoveredClientConfigActionPrompt: @@ -921,6 +930,10 @@ } } failure:^(NSError * _Nonnull error) { + MXStrongifyAndReturnIfNil(self); + + self->autoDiscovery = nil; + // Fail silently }]; } From 329076afc320407f100f658e541e7e650ee11a99 Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 7 Mar 2019 10:42:55 +0100 Subject: [PATCH 55/73] RoomVC: Use accent color (green) for the ongoing conference call banner --- CHANGES.rst | 1 + Riot/Modules/Room/Views/Activities/RoomActivitiesView.m | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4ca1beb12..c7de5aec8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ Improvements: * Add app store description as app string resource to make them available for translation on weblate (#2201). * Update deprecated contact availability checks (#2222). * RoomVC: Remove the beta warning modal when enabling e2e in a room (#2239). + * RoomVC: Use accent color (green) for the ongoing conference call banner. * Fastlane: Update to Xcode 10.1 (#2202). * Use SwiftLint to enforce Swift style and conventions (PR #2300). * Fix SWIFT_VERSION configuration in post install hook of Podfile (PR #2302). diff --git a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m index 2f2e05053..6648db9b1 100644 --- a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m +++ b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m @@ -1,6 +1,7 @@ /* Copyright 2015 OpenMarket Ltd Copyright 2017 Vector Creations Ltd + Copyright 2019 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -261,15 +262,15 @@ // Display the string in white on pink red NSRange wholeString = NSMakeRange(0, onGoingConferenceCallAttibutedString.length); [onGoingConferenceCallAttibutedString addAttribute:NSForegroundColorAttributeName value:ThemeService.shared.theme.backgroundColor range:wholeString]; - [onGoingConferenceCallAttibutedString addAttribute:NSBackgroundColorAttributeName value:ThemeService.shared.theme.warningColor range:wholeString]; + [onGoingConferenceCallAttibutedString addAttribute:NSBackgroundColorAttributeName value:ThemeService.shared.theme.tintColor range:wholeString]; [onGoingConferenceCallAttibutedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:wholeString]; self.messageTextView.attributedText = onGoingConferenceCallAttibutedString; self.messageTextView.tintColor = ThemeService.shared.theme.backgroundColor; self.messageTextView.hidden = NO; - self.backgroundColor = ThemeService.shared.theme.warningColor; - self.messageTextView.backgroundColor = ThemeService.shared.theme.warningColor; + self.backgroundColor = ThemeService.shared.theme.tintColor; + self.messageTextView.backgroundColor = ThemeService.shared.theme.tintColor; // Hide the separator to display correctly the red pink conf call banner self.separatorView.hidden = YES; From c9dec01b7c476723935d7ad38b2c0a3c7e8da983 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 6 Mar 2019 16:23:26 +0000 Subject: [PATCH 56/73] Translated using Weblate (Albanian) Currently translated at 99.5% (614 of 617 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/sq/ --- Riot/Assets/sq.lproj/Vector.strings | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Riot/Assets/sq.lproj/Vector.strings b/Riot/Assets/sq.lproj/Vector.strings index 5f613d1ed..04ea808f3 100644 --- a/Riot/Assets/sq.lproj/Vector.strings +++ b/Riot/Assets/sq.lproj/Vector.strings @@ -665,3 +665,8 @@ "e2e_key_backup_wrong_version_button_wasme" = "Prej meje qe"; "key_backup_setup_intro_manual_export_info" = "(Të mëtejshme)"; "key_backup_setup_intro_manual_export_action" = "Eksportoni kyçe dorazi"; +// String for App Store +"store_short_description" = "Fjalosje /VoIP e siguruar, e decentralizuar"; +"store_full_description" = "Komunikoni sipas rrugës tuaj.\n\nNjë aplikacion fjalosjesh, nën kontrollin tuaj dhe krejtësisht i zhdërvjellët. Riot-i ju lejon të komunikoni si doni. Krijuar për [matrix] - standardi për për komunikim të hapur, të decentralizuar.\n\nMerrni një llogari matrix.org falas, merrni shërbyesin tuaj te https://modular.im, ose përdorni një tjetër shërbyes Matrix.\n\nPse të zgjidhet Riot.im?\n\nKOMUNIKIM I PLOTË: Krijoni dhoma rreth ekipeve tuaja, shokëve tuaj, bashkësisë tuaj - rreth kujtdo që doni! Bisedoni, shkëmbeni kartela, shtoni widget-e dhe bëni thirrje audio dhe video - gjithçka falas.\n\nINTEGRIME TË FUQISHME: Përdoreni Riot.im me mjetet që njihni dhe doni. Me Riot.im mundeni madje të bisedoni me përdorues dhe grupe nën aplikacione të tjera fjalosjesh.\n\nPRIVAT DHE I SIGURUAR: Mbajini bisedat tuaja të fshehta. Fshehtëzimi skaj-më-skaj i fjalës së fundit garanton që komunikimi privat mbetet privat.\n\nI HAPUR, JO I MBYLLUR: Me burim të hapur dhe i ngritur mbi Matrix. Jini zot i të dhënave tuaja, duke strehuar shërbyesin tuaj, ose duke përzgjedhur një të cilit i besoni.\n\nKUDO QOFSHI: Mbani lidhjet, kudo qofshi, me historik plotësisht të njëkohësuar mesazhesh në krejt pajisjet tuaja dhe në internet, te https://riot.im."; +"auth_login_single_sign_on" = "Hyni përmes një hyrjeje njëshe"; +"room_message_unable_open_link_error_message" = "S’arrihet të hapet lidhja."; From 3a339bd56d2d603d1911b743b0f96d06999fd40b Mon Sep 17 00:00:00 2001 From: pogback Date: Thu, 7 Mar 2019 01:22:17 +0000 Subject: [PATCH 57/73] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (617 of 617 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/zh_Hans/ --- Riot/Assets/zh_Hans.lproj/Vector.strings | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Riot/Assets/zh_Hans.lproj/Vector.strings b/Riot/Assets/zh_Hans.lproj/Vector.strings index cd655a2c6..9e3d248fd 100644 --- a/Riot/Assets/zh_Hans.lproj/Vector.strings +++ b/Riot/Assets/zh_Hans.lproj/Vector.strings @@ -660,3 +660,5 @@ "sign_out_key_backup_in_progress_alert_title" = "密钥备份进行中。如果您此时登出账号将会失去已加密消息的访问权。"; "sign_out_key_backup_in_progress_alert_discard_key_backup_action" = "我不想要我的已加密消息了"; "sign_out_key_backup_in_progress_alert_cancel_action" = "等待"; +"auth_login_single_sign_on" = "使用单点登录方式登入"; +"room_message_unable_open_link_error_message" = "无法打开链接。"; From 0ee8bcfa5177ba86eb0b85920930f192131b47ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20C?= Date: Wed, 6 Mar 2019 11:46:17 +0000 Subject: [PATCH 58/73] Translated using Weblate (French) Currently translated at 100.0% (617 of 617 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/fr/ --- Riot/Assets/fr.lproj/Vector.strings | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Riot/Assets/fr.lproj/Vector.strings b/Riot/Assets/fr.lproj/Vector.strings index fc3da7c60..615b7812f 100644 --- a/Riot/Assets/fr.lproj/Vector.strings +++ b/Riot/Assets/fr.lproj/Vector.strings @@ -508,7 +508,7 @@ "room_details_flair_invalid_id_prompt_title" = "Format invalide"; "room_details_flair_invalid_id_prompt_msg" = "%@ n'est pas un identifiant valide pour une communauté"; "room_details_fail_to_update_room_communities" = "Échec de la mise à jour des communautés liées"; -"room_do_not_have_permission_to_post" = "Vous n'avez pas la permission d'envoyer des messages dans ce salon"; +"room_do_not_have_permission_to_post" = "Vous n’avez pas la permission d’envoyer des messages dans ce salon"; "room_event_action_kick_prompt_reason" = "Motif de l'expulsion de l'utilisateur"; "room_event_action_ban_prompt_reason" = "Raison du bannissement de l'utilisateur"; // GDPR @@ -672,3 +672,5 @@ // String for App Store "store_short_description" = "Discussions et appels sécurisés et décentralisés"; "store_full_description" = "Communiquez, à votre façon.\n\nUne application de discussion, que vous contrôlez et entièrement flexible. Riot vous laisse communiquer comme vous le souhaitez. Conçu pour [matrix], le standard pour les communications libres et décentralisées.\n\nCréez un compte matrix.org gratuit, gérez votre propre serveur sur https://modular.im ou utilisez un autre serveur Matrix.\n\nPourquoi choisir Riot.im ?\n\n• COMMUNICATION COMPLÈTE : Construisez des salons autours de vos équipes, de vos amis, de votre communauté comme vous le souhaitez ! Discutez, partagez des fichiers, ajoutez des widgets et passez des appels audio et vidéo gratuitement.\n\n• INTÉGRATIONS PUISSANTES : Utilisez Riot.im avec les outils que vous connaissez déjà. Avec Riot.im vous pouvez même discuter avec les utilisateurs et les groupes qui utilisent d'autres applications de discussion.\n\n• PRIVÉ ET SÉCURISÉ : Gardez vos conversations secrètes. Un chiffrement de bout en bout de pointe vous garanti que vos communications privées restent privées.\n\n• OUVERT, PAS FERMÉ : Open source, et construit autour de Matrix. Restez en possession de vos données en hébergeant votre propre serveur, ou choisissez celui auquel vous faites confiance.\n\n• PARTOUT OÙ VOUS ÊTES : Restez en contact où que vous soyez avec la synchronisation complète de l'historique de vos messages entre vos différents appareils et en ligne sur https://riot.im."; +"auth_login_single_sign_on" = "Se connecter avec l'authentification unique"; +"room_message_unable_open_link_error_message" = "Impossible d’ouvrir le lien."; From 03e7ff34afba00eba71c6d9a52c2f8fe298c99ce Mon Sep 17 00:00:00 2001 From: Szimszon Date: Wed, 6 Mar 2019 14:37:45 +0000 Subject: [PATCH 59/73] Translated using Weblate (Hungarian) Currently translated at 99.8% (616 of 617 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/hu/ --- Riot/Assets/hu.lproj/Vector.strings | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Riot/Assets/hu.lproj/Vector.strings b/Riot/Assets/hu.lproj/Vector.strings index 3cc0e577c..8708a6b48 100644 --- a/Riot/Assets/hu.lproj/Vector.strings +++ b/Riot/Assets/hu.lproj/Vector.strings @@ -676,3 +676,5 @@ "key_backup_setup_intro_manual_export_action" = "Kulcsok kimentése kézzel"; // String for App Store "store_short_description" = "Biztonságos elosztott csevegés/VoIP"; +"auth_login_single_sign_on" = "Bejelentkezés egyszeri bejelentkezéssel"; +"room_message_unable_open_link_error_message" = "A linket nem lehet megnyitni."; From a2bb7c99d7262bafc6624c8a178d564a69c37c8a Mon Sep 17 00:00:00 2001 From: sergio Date: Wed, 6 Mar 2019 12:14:40 +0000 Subject: [PATCH 60/73] Translated using Weblate (Russian) Currently translated at 97.2% (600 of 617 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/ru/ --- Riot/Assets/ru.lproj/Vector.strings | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Riot/Assets/ru.lproj/Vector.strings b/Riot/Assets/ru.lproj/Vector.strings index ce9aa8e13..2bf3f0c7f 100644 --- a/Riot/Assets/ru.lproj/Vector.strings +++ b/Riot/Assets/ru.lproj/Vector.strings @@ -673,3 +673,5 @@ // String for App Store "store_short_description" = "Безопасный децентрализованный чат/VoIP"; "store_full_description" = "Приложение для чата, под вашим контролем и полностью гибкое. Райот позволяет вам общаться так, как вы хотите. Сделано на [matrix] — стандарт для открытого, децентрализованного общения.\n\nПолучите бесплатную учетную запись на matrix.org, собственный сервер по адресу https://modular.im или используйте другой сервер Matrix.\n\nПочему стоит выбрать Riot.im?\n\n• ПОЛНАЯ СВЯЗЬ: создавайте комнаты для команд, друзей, сообщест — как хотите! Общайтесь, обменивайтесь файлами, добавляйте виджеты и совершайте голосовые и видеозвонки — и все это бесплатно.\n\n• МОЩНЫЕ ИНТЕГРАЦИИ: Используйте Riot.im с инструментами, которые знаете и любите. С Riot.im вы можете даже общаться с пользователями и группами других приложений.\n\n• ЧАСТНЫЕ И БЕЗОПАСНЫЕ: держите ваши разговоры в тайне. Современное сквозное шифрование гарантирует, что частное общение остается частным.\n\n• ОТКРЫТО, НЕ ЗАКРЫТО: Исходный код открыт, построено на Matrix. Владейте данными, используя собственный сервер или выбирайте тот, которому доверяете.\n\n• Везде, где вы находитесь: оставайтесь на связи, где бы вы ни находились, с полностью синхронизированной историей сообщений на всех ваших устройствах и в Интернете по адресу https://riot.im."; +"auth_login_single_sign_on" = "Вход с SSO"; +"room_message_unable_open_link_error_message" = "Невозможно открыть ссылку."; From ed80c1922eab2a290f90ea47a08275db60c0441b Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 7 Mar 2019 17:32:10 +0100 Subject: [PATCH 61/73] Add a custom hash method on String same as Riot Web --- Riot/Categories/Character.swift | 23 +++++++++++++++++++++++ Riot/Categories/String.swift | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 Riot/Categories/Character.swift create mode 100644 Riot/Categories/String.swift diff --git a/Riot/Categories/Character.swift b/Riot/Categories/Character.swift new file mode 100644 index 000000000..50ef89114 --- /dev/null +++ b/Riot/Categories/Character.swift @@ -0,0 +1,23 @@ +/* + Copyright 2019 New Vector Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import Foundation + +extension Character { + var vc_unicodeScalarCodePoint: UInt32 { + return self.unicodeScalars[self.unicodeScalars.startIndex].value + } +} diff --git a/Riot/Categories/String.swift b/Riot/Categories/String.swift new file mode 100644 index 000000000..c492e71dd --- /dev/null +++ b/Riot/Categories/String.swift @@ -0,0 +1,32 @@ +/* + Copyright 2019 New Vector Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import Foundation + +extension String { + + /// Calculates a numeric hash same as Riot Web + /// See original function here https://github.com/matrix-org/matrix-react-sdk/blob/321dd49db4fbe360fc2ff109ac117305c955b061/src/utils/FormattingUtils.js#L47 + var vc_hashCode: Int32 { + var hash: Int32 = 0 + + for character in self { + let shiftedHash = hash << 5 + hash = shiftedHash.subtractingReportingOverflow(hash).partialValue + Int32(character.vc_unicodeScalarCodePoint) + } + return abs(hash) + } +} From 9287699a254f42d5454638bac9ba56852041cd55 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 7 Mar 2019 17:33:52 +0100 Subject: [PATCH 62/73] Add user name colors property on Theme. Used for user name color generation. --- Riot/Managers/Theme/Theme.swift | 3 ++- Riot/Managers/Theme/Themes/DarkTheme.swift | 11 +++++++++++ Riot/Managers/Theme/Themes/DefaultTheme.swift | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 8ead5dbbe..375dd3913 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -50,7 +50,8 @@ import UIKit var warningColor: UIColor { get } var avatarColors: [UIColor] { get } - + + var userNameColors: [UIColor] { get } // MARK: - Appearance and style diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index a3e6d1c5f..1b3651a6e 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -51,6 +51,17 @@ class DarkTheme: NSObject, Theme { UIColor(rgb: 0x03B381), UIColor(rgb: 0x368BD6), UIColor(rgb: 0xAC3BA8)] + + var userNameColors: [UIColor] = [ + UIColor(rgb: 0x368BD6), + UIColor(rgb: 0xAC3BA8), + UIColor(rgb: 0x03B381), + UIColor(rgb: 0xE64F7A), + UIColor(rgb: 0xFF812D), + UIColor(rgb: 0x2DC2C5), + UIColor(rgb: 0x5C56F5), + UIColor(rgb: 0x74D12C) + ] var statusBarStyle: UIStatusBarStyle = .lightContent var scrollBarStyle: UIScrollView.IndicatorStyle = .white diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index d2490640d..d1bcaf9f8 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -51,6 +51,17 @@ class DefaultTheme: NSObject, Theme { UIColor(rgb: 0x03B381), UIColor(rgb: 0x368BD6), UIColor(rgb: 0xAC3BA8)] + + var userNameColors: [UIColor] = [ + UIColor(rgb: 0x368BD6), + UIColor(rgb: 0xAC3BA8), + UIColor(rgb: 0x03B381), + UIColor(rgb: 0xE64F7A), + UIColor(rgb: 0xFF812D), + UIColor(rgb: 0x2DC2C5), + UIColor(rgb: 0x5C56F5), + UIColor(rgb: 0x74D12C) + ] var statusBarStyle: UIStatusBarStyle = .lightContent var scrollBarStyle: UIScrollView.IndicatorStyle = .default From 28b28eda0a11efa62b5b4b3abd159f821bcba807 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 7 Mar 2019 17:36:40 +0100 Subject: [PATCH 63/73] Create UserNameColorGenerator used to generate a user name color from user id --- Riot.xcodeproj/project.pbxproj | 18 +++++++++ Riot/Utils/UserNameColorGenerator.swift | 50 +++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 Riot/Utils/UserNameColorGenerator.swift diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index aba1424ef..f4f6d4f54 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -380,6 +380,12 @@ B1D4752821EE4E630067973F /* KeyboardNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D4752621EE4E620067973F /* KeyboardNotification.swift */; }; B1D4752A21EE52B10067973F /* KeyBackupSetupIntroViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D4752921EE52B10067973F /* KeyBackupSetupIntroViewController.swift */; }; B1D4752C21EE52C30067973F /* KeyBackupSetupIntroViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B1D4752B21EE52C30067973F /* KeyBackupSetupIntroViewController.storyboard */; }; + B1DB4F06223015080065DBFA /* Character.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DB4F05223015080065DBFA /* Character.swift */; }; + B1DB4F0722301AF20065DBFA /* Character.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DB4F05223015080065DBFA /* Character.swift */; }; + B1DB4F0B223131600065DBFA /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DB4F0A223131600065DBFA /* String.swift */; }; + B1DB4F0C2231494F0065DBFA /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DB4F0A223131600065DBFA /* String.swift */; }; + B1DB4F0E22316FFF0065DBFA /* UserNameColorGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DB4F0D22316FFF0065DBFA /* UserNameColorGenerator.swift */; }; + B1DB4F0F223170000065DBFA /* UserNameColorGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DB4F0D22316FFF0065DBFA /* UserNameColorGenerator.swift */; }; B1E5368921FB1E20001F3AFF /* UIButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E5368821FB1E20001F3AFF /* UIButton.swift */; }; B1E5368D21FB7245001F3AFF /* KeyBackupRecoverFromPassphraseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E5368C21FB7245001F3AFF /* KeyBackupRecoverFromPassphraseViewController.swift */; }; B1E5368F21FB7258001F3AFF /* KeyBackupRecoverFromPassphraseViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B1E5368E21FB7258001F3AFF /* KeyBackupRecoverFromPassphraseViewController.storyboard */; }; @@ -1036,6 +1042,9 @@ B1D4752621EE4E620067973F /* KeyboardNotification.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardNotification.swift; sourceTree = ""; }; B1D4752921EE52B10067973F /* KeyBackupSetupIntroViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyBackupSetupIntroViewController.swift; sourceTree = ""; }; B1D4752B21EE52C30067973F /* KeyBackupSetupIntroViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = KeyBackupSetupIntroViewController.storyboard; sourceTree = ""; }; + B1DB4F05223015080065DBFA /* Character.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Character.swift; sourceTree = ""; }; + B1DB4F0A223131600065DBFA /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + B1DB4F0D22316FFF0065DBFA /* UserNameColorGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNameColorGenerator.swift; sourceTree = ""; }; B1E5368821FB1E20001F3AFF /* UIButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIButton.swift; sourceTree = ""; }; B1E5368C21FB7245001F3AFF /* KeyBackupRecoverFromPassphraseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyBackupRecoverFromPassphraseViewController.swift; sourceTree = ""; }; B1E5368E21FB7258001F3AFF /* KeyBackupRecoverFromPassphraseViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = KeyBackupRecoverFromPassphraseViewController.storyboard; sourceTree = ""; }; @@ -2857,6 +2866,8 @@ B1E5368821FB1E20001F3AFF /* UIButton.swift */, 3281BCF62201FA4200F4A383 /* UIControl.swift */, B109D6F0222D8C400061B6D9 /* UIApplication.swift */, + B1DB4F05223015080065DBFA /* Character.swift */, + B1DB4F0A223131600065DBFA /* String.swift */, ); path = Categories; sourceTree = ""; @@ -2890,6 +2901,7 @@ F083BC131E7009EC00A9B29C /* EventFormatter.m */, F083BC141E7009EC00A9B29C /* Tools.h */, F083BC151E7009EC00A9B29C /* Tools.m */, + B1DB4F0D22316FFF0065DBFA /* UserNameColorGenerator.swift */, ); path = Utils; sourceTree = ""; @@ -3417,9 +3429,11 @@ 32242F1621E8FBCC00725742 /* ThemeService.m in Sources */, 24EEE5A31F23A8C300B3C705 /* AvatarGenerator.m in Sources */, B1664BCF20F4E67600808783 /* ShareExtensionManager.m in Sources */, + B1DB4F0722301AF20065DBFA /* Character.swift in Sources */, 3209451321F1C1D50088CAA2 /* BlackTheme.swift in Sources */, 24EEE5A21F23A8B400B3C705 /* MXRoom+Riot.m in Sources */, B1664BC720F4E67600808783 /* SharePresentingViewController.m in Sources */, + B1DB4F0F223170000065DBFA /* UserNameColorGenerator.swift in Sources */, F0A8955F1F7D1FEA00BD6C2A /* MXRoomSummary+Riot.m in Sources */, 32242F1721E8FBE500725742 /* Theme.swift in Sources */, B169328320F38AE600746532 /* RiotSettings.swift in Sources */, @@ -3427,6 +3441,7 @@ 32242F1921E8FBFB00725742 /* DarkTheme.swift in Sources */, B1664BC820F4E67600808783 /* ShareDataSource.m in Sources */, B1664BCD20F4E67600808783 /* RecentRoomTableViewCell.m in Sources */, + B1DB4F0C2231494F0065DBFA /* String.swift in Sources */, B169331720F3CBE000746532 /* RecentCellData.m in Sources */, B1664BCC20F4E67600808783 /* RoomsListViewController.m in Sources */, ); @@ -3459,6 +3474,7 @@ B169330820F3CA0E00746532 /* ContactsDataSource.m in Sources */, B1B5574B20EE6C4D00210D55 /* MediaAlbumContentViewController.m in Sources */, B1B5598820EFC3E000210D55 /* WidgetManager.m in Sources */, + B1DB4F0E22316FFF0065DBFA /* UserNameColorGenerator.swift in Sources */, B1057789221304EC00334B1E /* KeyBackupSetupSuccessFromPassphraseViewController.swift in Sources */, B16932B120F3AC9200746532 /* RoomSearchDataSource.m in Sources */, B16932A320F3A21C00746532 /* main.m in Sources */, @@ -3666,6 +3682,7 @@ 32BF994F21FA29A400698084 /* SettingsKeyBackupViewModel.swift in Sources */, B1B5574920EE6C4D00210D55 /* RiotSplitViewController.m in Sources */, B1B5574E20EE6C4D00210D55 /* DirectoryServerPickerViewController.m in Sources */, + B1DB4F0B223131600065DBFA /* String.swift in Sources */, B1B5575B20EE6C4D00210D55 /* HomeFilesSearchViewController.m in Sources */, B139C22521FF01C100BB68EC /* KeyBackupRecoverFromPassphraseCoordinator.swift in Sources */, B1098BFD21ECFE65000DDA48 /* PasswordStrengthManager.swift in Sources */, @@ -3680,6 +3697,7 @@ B1B558FF20EF768F00210D55 /* RoomIncomingTextMsgBubbleCell.m in Sources */, B1098C0021ECFE65000DDA48 /* KeyBackupSetupPassphraseViewController.swift in Sources */, B1B5591020EF782800210D55 /* TableViewCellWithPhoneNumberTextField.m in Sources */, + B1DB4F06223015080065DBFA /* Character.swift in Sources */, B14F143022144F6500FA0595 /* KeyBackupRecoverFromRecoveryKeyCoordinatorType.swift in Sources */, B1E5368921FB1E20001F3AFF /* UIButton.swift in Sources */, ); diff --git a/Riot/Utils/UserNameColorGenerator.swift b/Riot/Utils/UserNameColorGenerator.swift new file mode 100644 index 000000000..3e5c2adcd --- /dev/null +++ b/Riot/Utils/UserNameColorGenerator.swift @@ -0,0 +1,50 @@ +/* + Copyright 2019 New Vector Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import Foundation +import UIKit + +/// Generate a user name color from user id +@objcMembers +final class UserNameColorGenerator: NSObject { + + // MARK: - Properties + + /// User name colors. + var userNameColors: [UIColor] = [] + + /// Fallback color when `userNameColors` is empty. + var defaultColor: UIColor = .black + + // MARK: - Public + + /// Generate a user name color from the user ID. + /// + /// - Parameter userId: The user ID of the user. + /// - Returns: A color associated to the user ID. + func color(from userId: String) -> UIColor { + guard self.userNameColors.isEmpty == false else { + return self.defaultColor + } + + guard userId.isEmpty == false else { + return self.userNameColors[0] + } + + let senderNameColorIndex = Int(userId.vc_hashCode % Int32(self.userNameColors.count)) + return self.userNameColors[senderNameColorIndex] + } +} From 5407e0e85164aaaf9cb0bfa3f5876854cf72c718 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 7 Mar 2019 17:44:15 +0100 Subject: [PATCH 64/73] Add a convenience method on `MXKRoomBubbleTableViewCell` Riot category to update the color name based on the sender id. --- .../MXKRoomBubbleTableViewCell+Riot.h | 5 ++++ .../MXKRoomBubbleTableViewCell+Riot.m | 26 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.h b/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.h index 7967ba35e..5162457f2 100644 --- a/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.h +++ b/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.h @@ -68,6 +68,11 @@ extern NSString *const kMXKRoomBubbleCellTapOnReceiptsContainer; */ - (IBAction)onReceiptContainerTap:(UITapGestureRecognizer *)sender; +/** + Update username label color based on bubble data sender ID. + */ +- (void)updateUserNameColor; + /** Blur the view by adding a transparent overlay. Default is NO. */ diff --git a/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.m b/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.m index 92e6044b6..2e025b1ac 100644 --- a/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.m +++ b/Riot/Categories/MXKRoomBubbleTableViewCell+Riot.m @@ -386,6 +386,32 @@ NSString *const kMXKRoomBubbleCellTapOnReceiptsContainer = @"kMXKRoomBubbleCellT return objc_getAssociatedObject(self, @selector(markerView)); } +- (void)updateUserNameColor +{ + static UserNameColorGenerator *userNameColorGenerator; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + userNameColorGenerator = [UserNameColorGenerator new]; + }); + + id theme = ThemeService.shared.theme; + + userNameColorGenerator.defaultColor = theme.textPrimaryColor; + userNameColorGenerator.userNameColors = theme.userNameColors; + + NSString *senderId = self.bubbleData.senderId; + + if (senderId) + { + self.userNameLabel.textColor = [userNameColorGenerator colorFrom:senderId]; + } + else + { + self.userNameLabel.textColor = userNameColorGenerator.defaultColor; + } +} + #pragma mark - User actions - (IBAction)onEditButtonPressed:(id)sender From f45cd824a1252b777374a44fc9a9653d6338e7a7 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 7 Mar 2019 17:46:45 +0100 Subject: [PATCH 65/73] Apply new user name color generation on bubble cells where needed --- .../Views/MessagesSearchResultAttachmentBubbleCell.m | 7 +++++-- .../Views/MessagesSearchResultTextMsgBubbleCell.m | 5 ++++- .../BubbleCells/RoomIncomingAttachmentBubbleCell.m | 11 ++++++++++- ...IncomingAttachmentWithPaginationTitleBubbleCell.m | 6 ++++-- .../BubbleCells/RoomIncomingTextMsgBubbleCell.m | 11 ++++++++++- ...oomIncomingTextMsgWithPaginationTitleBubbleCell.m | 6 ++++-- .../BubbleCells/RoomOutgoingAttachmentBubbleCell.m | 5 ++++- ...OutgoingAttachmentWithPaginationTitleBubbleCell.m | 5 +++-- .../BubbleCells/RoomOutgoingTextMsgBubbleCell.m | 12 +++++++++++- 9 files changed, 55 insertions(+), 13 deletions(-) diff --git a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m index 2423473ed..a7e22ae4b 100644 --- a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m +++ b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultAttachmentBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation MessagesSearchResultAttachmentBubbleCell @@ -26,11 +27,11 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; - self.roomNameLabel.textColor = ThemeService.shared.theme.textSecondaryColor; self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; + + [self updateUserNameColor]; } - (void)render:(MXKCellData *)cellData @@ -52,6 +53,8 @@ { self.roomNameLabel.text = bubbleData.roomId; } + + [self updateUserNameColor]; } } diff --git a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m index ea0e14502..3a29ef6b1 100644 --- a/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m +++ b/Riot/Modules/GlobalSearch/Messages/Views/MessagesSearchResultTextMsgBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation MessagesSearchResultTextMsgBubbleCell @@ -26,7 +27,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + [self updateUserNameColor]; self.roomNameLabel.textColor = ThemeService.shared.theme.textSecondaryColor; @@ -48,6 +49,8 @@ { self.roomNameLabel.text = bubbleData.roomId; } + + [self updateUserNameColor]; } } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m index ba01ef0b5..00018fb4d 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation RoomIncomingAttachmentBubbleCell @@ -26,8 +27,16 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + [self updateUserNameColor]; + self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; } +- (void)render:(MXKCellData *)cellData +{ + [super render:cellData]; + + [self updateUserNameColor]; +} + @end diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m index 8686be688..519bff872 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation RoomIncomingAttachmentWithPaginationTitleBubbleCell @@ -26,8 +27,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; - + [self updateUserNameColor]; self.paginationLabel.textColor = ThemeService.shared.theme.tintColor; self.paginationSeparatorView.backgroundColor = ThemeService.shared.theme.tintColor; self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; @@ -40,6 +40,8 @@ if (bubbleData) { self.paginationLabel.text = [[bubbleData.eventFormatter dateStringFromDate:bubbleData.date withTime:NO] uppercaseString]; + + [self updateUserNameColor]; } } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m index 605d9e9a3..d308fcfea 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation RoomIncomingTextMsgBubbleCell @@ -26,8 +27,16 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + [self updateUserNameColor]; + self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; } +- (void)render:(MXKCellData *)cellData +{ + [super render:cellData]; + + [self updateUserNameColor]; +} + @end diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m index 83bff1cf7..2e8bdeb34 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation RoomIncomingTextMsgWithPaginationTitleBubbleCell @@ -26,8 +27,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; - + [self updateUserNameColor]; self.paginationLabel.textColor = ThemeService.shared.theme.tintColor; self.paginationSeparatorView.backgroundColor = ThemeService.shared.theme.tintColor; self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; @@ -40,6 +40,8 @@ if (bubbleData) { self.paginationLabel.text = [[bubbleData.eventFormatter dateStringFromDate:bubbleData.date withTime:NO] uppercaseString]; + + [self updateUserNameColor]; } } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m index bb786416a..a50ffe6c9 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation RoomOutgoingAttachmentBubbleCell @@ -26,7 +27,8 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + [self updateUserNameColor]; + self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; } @@ -34,6 +36,7 @@ { [super render:cellData]; + [self updateUserNameColor]; [RoomOutgoingAttachmentBubbleCell render:cellData inBubbleCell:self]; } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m index 25911ddf2..bd4df0000 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation RoomOutgoingAttachmentWithPaginationTitleBubbleCell @@ -26,8 +27,7 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; - + [self updateUserNameColor]; self.paginationLabel.textColor = ThemeService.shared.theme.tintColor; self.paginationSeparatorView.backgroundColor = ThemeService.shared.theme.tintColor; self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; @@ -40,6 +40,7 @@ if (bubbleData) { self.paginationLabel.text = [[bubbleData.eventFormatter dateStringFromDate:bubbleData.date withTime:NO] uppercaseString]; + [self updateUserNameColor]; } } diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m index bff6e2f13..374ed6da0 100644 --- a/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m +++ b/Riot/Modules/Room/Views/BubbleCells/RoomOutgoingTextMsgBubbleCell.m @@ -19,6 +19,7 @@ #import "ThemeService.h" #import "Riot-Swift.h" +#import "MXKRoomBubbleTableViewCell+Riot.h" @implementation RoomOutgoingTextMsgBubbleCell @@ -26,8 +27,17 @@ { [super customizeTableViewCellRendering]; - self.userNameLabel.textColor = ThemeService.shared.theme.textPrimaryColor; + [self updateUserNameColor]; + self.messageTextView.tintColor = ThemeService.shared.theme.tintColor; } + +- (void)render:(MXKCellData *)cellData +{ + [super render:cellData]; + + [self updateUserNameColor]; +} + @end From c6cbb4fdf0734c7381ac476c6a2ebe443e454377 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 7 Mar 2019 17:51:39 +0100 Subject: [PATCH 66/73] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index c7de5aec8..eb248eb88 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,7 @@ Improvements: * Fix SWIFT_VERSION configuration in post install hook of Podfile (PR #2302). * Authentication: support SSO by using the fallback URL (#2307). * Authentication: .well-known support (#2117). + * Reskin: Colorise users displaynames (#2287). Bug fix: * Reskin: status bar text is no more readable on iPad (#2276). From ba500e58b3d553e19b93052a2ba85308bd73b7a5 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 7 Mar 2019 13:16:54 +0000 Subject: [PATCH 67/73] Translated using Weblate (Bulgarian) Currently translated at 99.8% (617 of 618 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/bg/ --- Riot/Assets/bg.lproj/Vector.strings | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Riot/Assets/bg.lproj/Vector.strings b/Riot/Assets/bg.lproj/Vector.strings index e6681c7ad..562310eb8 100644 --- a/Riot/Assets/bg.lproj/Vector.strings +++ b/Riot/Assets/bg.lproj/Vector.strings @@ -254,7 +254,7 @@ // Room Preview "room_preview_invitation_format" = "Вие сте поканен да се присъедините към тази стая от %@"; "room_preview_subtitle" = "Това е преглед на стаята. Интеракции в нея са изключени."; -"room_preview_unlinked_email_warning" = "Поканата беше изпратена на %@, който не е свързан с този профил. Може да искате да влезете с друг профил или да добавите имейл адреса в този."; +"room_preview_unlinked_email_warning" = "Поканата беше изпратена на %@, който не е свързан с този профил. Може би искате да влезете с друг профил или да добавите имейл адреса в този."; "room_preview_try_join_an_unknown_room" = "Опитвате се да влезете в %@. Желаете ли да се присъедините, за да участвате в дискусията?"; "room_preview_try_join_an_unknown_room_default" = "стая"; // Settings @@ -671,3 +671,5 @@ // String for App Store "store_short_description" = "Защитен децентрализиран чат/VoIP"; "store_full_description" = "Комуникирай по свой начин.\n\nЧат приложение, което е изцяло гъвкаво и под Ваш контрол. Riot позволява да комуникирате по начина, по който искате. Направено за [matrix] - стандарт за отворена и децентрализирана комуникация.\n\nИзползвайте безплатен matrix.org акаунт, собствен сървър от https://modular.im или друг Matrix сървър.\n\nЗащо да изберете Riot.im?\n\n• ПЪЛНА КОМУНИКАЦИЯ: Създавайте каквито пожелаете чат стаи - свързани с работни екипи, приятели или друг вид общности! Чатете, споделяйте файлове, добавяйте приспособления и водете аудио и видео разговори - всичко това, изцяло безплатно.\n\n• МОЩНИ ИНТЕГРАЦИИ: Използвайте Riot.im с досега-познатите Ви инструменти. Посредством Riot.im дори можете да чатите с потребители и групи използващи други чат приложения.\n\n• ЛИЧНО И ЗАЩИТЕНО: Пазете комуникацията си в тайна. Съвременна технология за шифроване от край до край гарантира, че Вашата комуникацията наистина остава Ваша.\n\n• ОТВОРЕНО, А НЕ ЗАТВОРЕНО: Приложение с отворен код, изградено върху Matrix. Дръжте данните си под Ваш контрол, като използвате Ваш собствен сървър или като изберете сървър, на който вярвате.\n\n• КЪДЕТО И ДА СТЕ: Поддържайте връзка където и да сте, с напълно синхронизирана чат история на всички Ваши устройства или онлайн на https://riot.im."; +"auth_autodiscover_invalid_response" = "Невалиден отговор при опит за откриване на адреса на сървъра"; +"room_message_unable_open_link_error_message" = "Неуспешно отваряне на връзката."; From 35a34c0333dbcb7166e91d0ddedcb2cf9bf4b343 Mon Sep 17 00:00:00 2001 From: pogback Date: Thu, 7 Mar 2019 12:10:33 +0000 Subject: [PATCH 68/73] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (618 of 618 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/zh_Hans/ --- Riot/Assets/zh_Hans.lproj/Vector.strings | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Riot/Assets/zh_Hans.lproj/Vector.strings b/Riot/Assets/zh_Hans.lproj/Vector.strings index 9e3d248fd..b0acd371e 100644 --- a/Riot/Assets/zh_Hans.lproj/Vector.strings +++ b/Riot/Assets/zh_Hans.lproj/Vector.strings @@ -231,7 +231,7 @@ // Room Preview "room_preview_invitation_format" = "您已经通过 %@ 的邀请而加入此聊天室"; "room_preview_subtitle" = "这是此聊天室的一个预览。聊天室交互已禁用。"; -"room_preview_unlinked_email_warning" = "此邀请已发送至 %@,但没和这个账户关联。你可能希望用一个不同的账户登录,或者把这个电子邮箱加入到这个账户。"; +"room_preview_unlinked_email_warning" = "此邀请已发送至未与此帐户关联的 %@。你可能希望用一个不同的账户登录,或者把这个电子邮箱加入到您的账户。"; "room_preview_try_join_an_unknown_room" = "你正在尝试访问 %@。你要加入以参与讨论吗?"; "room_preview_try_join_an_unknown_room_default" = "一间聊天室"; // Settings @@ -662,3 +662,4 @@ "sign_out_key_backup_in_progress_alert_cancel_action" = "等待"; "auth_login_single_sign_on" = "使用单点登录方式登入"; "room_message_unable_open_link_error_message" = "无法打开链接。"; +"auth_autodiscover_invalid_response" = "无效的主服务器探测响应"; From beb31c0291b5bd50931aa1c0c00603b0d4aafe51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20C?= Date: Thu, 7 Mar 2019 19:34:50 +0000 Subject: [PATCH 69/73] Translated using Weblate (French) Currently translated at 100.0% (618 of 618 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/fr/ --- Riot/Assets/fr.lproj/Vector.strings | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Riot/Assets/fr.lproj/Vector.strings b/Riot/Assets/fr.lproj/Vector.strings index 615b7812f..d9c0dfb36 100644 --- a/Riot/Assets/fr.lproj/Vector.strings +++ b/Riot/Assets/fr.lproj/Vector.strings @@ -237,7 +237,7 @@ // Room Preview "room_preview_invitation_format" = "Vous avez été invité(e) à rejoindre ce salon par %@"; "room_preview_subtitle" = "Ceci est un aperçu du salon. Les interactions avec le salon sont désactivées."; -"room_preview_unlinked_email_warning" = "Cette invitation a été envoyée à %@, qui n'est pas associé à ce compte. Vous pouvez vous identifier avec un compte différent ou ajouter cette adresse e-mail à ce compte."; +"room_preview_unlinked_email_warning" = "Cette invitation a été envoyée à %@, qui n'est pas associé à ce compte. Vous pouvez vous identifier avec un compte différent ou ajouter cette adresse e-mail à votre compte."; "room_preview_try_join_an_unknown_room" = "Vous essayez d'accéder à %@. Voulez-vous rejoindre la discussion afin d'y participer ?"; "room_preview_try_join_an_unknown_room_default" = "un salon"; // Settings @@ -674,3 +674,4 @@ "store_full_description" = "Communiquez, à votre façon.\n\nUne application de discussion, que vous contrôlez et entièrement flexible. Riot vous laisse communiquer comme vous le souhaitez. Conçu pour [matrix], le standard pour les communications libres et décentralisées.\n\nCréez un compte matrix.org gratuit, gérez votre propre serveur sur https://modular.im ou utilisez un autre serveur Matrix.\n\nPourquoi choisir Riot.im ?\n\n• COMMUNICATION COMPLÈTE : Construisez des salons autours de vos équipes, de vos amis, de votre communauté comme vous le souhaitez ! Discutez, partagez des fichiers, ajoutez des widgets et passez des appels audio et vidéo gratuitement.\n\n• INTÉGRATIONS PUISSANTES : Utilisez Riot.im avec les outils que vous connaissez déjà. Avec Riot.im vous pouvez même discuter avec les utilisateurs et les groupes qui utilisent d'autres applications de discussion.\n\n• PRIVÉ ET SÉCURISÉ : Gardez vos conversations secrètes. Un chiffrement de bout en bout de pointe vous garanti que vos communications privées restent privées.\n\n• OUVERT, PAS FERMÉ : Open source, et construit autour de Matrix. Restez en possession de vos données en hébergeant votre propre serveur, ou choisissez celui auquel vous faites confiance.\n\n• PARTOUT OÙ VOUS ÊTES : Restez en contact où que vous soyez avec la synchronisation complète de l'historique de vos messages entre vos différents appareils et en ligne sur https://riot.im."; "auth_login_single_sign_on" = "Se connecter avec l'authentification unique"; "room_message_unable_open_link_error_message" = "Impossible d’ouvrir le lien."; +"auth_autodiscover_invalid_response" = "Réponse de découverte du serveur d’accueil non valide"; From 724e9c1cc1e3f68ba1436e736367001156ff3949 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Thu, 7 Mar 2019 20:45:18 +0000 Subject: [PATCH 70/73] Translated using Weblate (Hungarian) Currently translated at 100.0% (618 of 618 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/hu/ --- Riot/Assets/hu.lproj/Vector.strings | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Riot/Assets/hu.lproj/Vector.strings b/Riot/Assets/hu.lproj/Vector.strings index 8708a6b48..b4ea620de 100644 --- a/Riot/Assets/hu.lproj/Vector.strings +++ b/Riot/Assets/hu.lproj/Vector.strings @@ -678,3 +678,5 @@ "store_short_description" = "Biztonságos elosztott csevegés/VoIP"; "auth_login_single_sign_on" = "Bejelentkezés egyszeri bejelentkezéssel"; "room_message_unable_open_link_error_message" = "A linket nem lehet megnyitni."; +"store_full_description" = "Beszélgess, ahogy tetszik.\n\nA csevegő alkalmazás ami személyre szabható és az irányításod alatt marad. Riot megteremti a lehetőséget, hogy úgy beszélgess ahogy szeretnél. A [matrix] hálózathoz tervezve - ami egy nyílt és elosztott hálózat.\n\nKészíts egy ingyenes matrix.org fiókot vagy igényelj egy saját szervert a https://modular.im -től, de üzemeltethetsz is saját Matrix szervert.\n\nMiért válaszd a Riot.im-et?\n\nTELJES KOMMUNIKÁCIÓ: Nyiss szobákat a csoportod, barátaid, közösséged vagy bárkiknek akiknek szeretnél! Beszélgess, ossz meg fájlokat, adj hozzá kisalkalmazásokat és indíts hang és videóhívásokat - teljesen ingyen.\n\nERŐS KAPCSOLATOK: Használd a Riot-ot a kedvenc eszközeiddel. A Riottal még másik rendszerekben lévő emberekkel és csoportokkal is képes lehetsz beszélgetni.\n\nSZEMÉLYES ÉS BIZTONSÁGOS: Tartsd a beszélgetéseidet titokban. A végponttól-végpontig titkosítás biztosítja, hogy a személyes beszélgetések személyesek maradnak.\n\nNYÍLT ÉS NEM ZÁRT: Nyílt forrású és a Matrix-hoz készült. Az adataid maradjanak a birtokodban a saját szerver üzemeltetésével vagy válassz olyan szervert amiben megbízol.\n\nMINDENHOL AMERRE JÁRSZ: Maradj kapcsolatban a többiekkel mindenhol az eszközeid közötti teljesen szinkronizált üzenetváltásokkal. Akár a https://riot.im -en."; +"auth_autodiscover_invalid_response" = "Matrix szerver felderítésénél érvénytelen válasz érkezett"; From 2ce19a95c6b673fc789ee5dcb85d8d681f2f951b Mon Sep 17 00:00:00 2001 From: tea Date: Sun, 10 Mar 2019 14:53:13 +0000 Subject: [PATCH 71/73] Translated using Weblate (Italian) Currently translated at 9.2% (57 of 618 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/it/ --- Riot/Assets/it.lproj/Vector.strings | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/Riot/Assets/it.lproj/Vector.strings b/Riot/Assets/it.lproj/Vector.strings index 2faf46584..e23b35b4b 100644 --- a/Riot/Assets/it.lproj/Vector.strings +++ b/Riot/Assets/it.lproj/Vector.strings @@ -3,3 +3,58 @@ "title_favourites" = "Preferiti"; "title_people" = "Persone"; "title_rooms" = "Stanze"; +"store_full_description" = "Riot.im - Comunica, a modo tuo.\n\nUn'app di chat, sotto il tuo controllo e interamente flessibile. Riot ti permette di comunicare a modo tuo. Creata per [matrix] - lo standard per le comunicazioni aperte, decentralizzate.\n\nOttieni un account matrix.org gratuito, ottieni il tuo server su https://modular.im, o usa un altro server Matrix.\n\nPerchè scegliere Riot.im?\n\n• COMUNICAZIONE COMPLETA: crea stanze per i tuoi team, i tuoi amici, la tua comunità - come preferisci! Chatta, condividi file, aggiungi widget e fai videochiamate vocali - tutto gratuito.\n\n• GRANDI INTEGRAZIONI: usa Riot.im con gli strumenti che conosci ed ami. Con Riot.im puoi addirittura chattare con utenti e gruppi su altre app di chat.\n\n• PRIVATO E SICURO: tieni segrete le tue conversazioni. Una crittografia end-to-end allo stato dell'arte assicura che le comunicazioni private restino tali.\n\n• OPEN, NON CHIUSO: open source e costruito su Matrix. Possiedi i tuoi dati ospitando il tuo server personale, o scegliendone uno di cui ti fidi.\n\n• OVUNQUE TU SIA: resta in contatto ovunque tu sia con la cronologia dei messaggi totalmente sincronizzata tra i tuoi dispositivi ed online su https://riot.im."; +"title_groups" = "Comunità"; +"warning" = "Attenzione"; +"next" = ""; +"leave" = "Lascia"; +"remove" = "Rimuovi"; +"invite" = "Invita"; +"cancel" = "Annulla"; +"save" = "Salva"; +"join" = "Unisciti"; +"decline" = "Rifiuta"; +"accept" = "Accetto"; +"preview" = "Anteprima"; +"rename" = "Rinomina"; +"collapse" = "collassa"; +"send_to" = "Invia a %@"; +// Authentication +"auth_login" = "Accedi"; +"auth_register" = "Registrati"; +"auth_skip" = "Salta"; +"auth_send_reset_email" = "Invia email di ripristino"; +"auth_return_to_login" = "Torna alla schermata di accesso"; +"auth_user_id_placeholder" = "Email o nome utente"; +"auth_password_placeholder" = "Password"; +"auth_new_password_placeholder" = "Nuova password"; +"auth_user_name_placeholder" = "Nome utente"; +"auth_optional_email_placeholder" = "Indirizzo email (opzionale)"; +"auth_email_placeholder" = "Indirizzo email"; +"auth_optional_phone_placeholder" = "Numero di telefono (opzionale)"; +"auth_phone_placeholder" = "Numero di telefono"; +"auth_repeat_password_placeholder" = "Ripeti password"; +"auth_repeat_new_password_placeholder" = "Conferma la nuova password"; +"auth_home_server_placeholder" = "URL (es. https://matrix.org)"; +"auth_identity_server_placeholder" = "URL (es. https://matrix.org)"; +"auth_invalid_login_param" = "Nome utente e/o password non corretti"; +"auth_invalid_user_name" = "Il nome utente può contenere solo lettere, numeri, punti, trattini e linee basse"; +"auth_invalid_password" = "Password troppo breve (min 6)"; +"auth_invalid_email" = "Non sembra essere un indirizzo email valido"; +"auth_invalid_phone" = "Non sembra essere un numero di telefono valido"; +"auth_missing_password" = "Password mancante"; +"auth_add_email_message" = "Aggiungi un indirizzo email al tuo account per farti trovare e per poter resettare la password."; +"auth_add_phone_message" = "Aggiungi un numero di telefono al tuo account per farti trovare."; +"auth_add_email_phone_message" = "Aggiungi un indirizzo email ed un numero di telefono al tuo account per farti trovare. L'indirizzo email ti permetterà anche di resettare la password."; +"auth_add_email_and_phone_message" = "Aggiungi un indirizzo email ed un numero di telefono al tuo account per farti trovare. L'indirizzo email ti permetterà anche di resettare la password."; +"auth_missing_email" = "Indirizzo email mancante"; +"auth_missing_phone" = "Numero di telefono mancante"; +"auth_missing_email_or_phone" = "Indirizzo email o numero di telefono mancante"; +"auth_email_in_use" = "Questo indirizzo email è già in uso"; +"auth_phone_in_use" = "Questo numero di telefono è già in uso"; +"auth_forgot_password" = "Password dimenticata?"; +"auth_email_validation_message" = "Per favore controlla la tua email per proseguire la registrazione"; +"auth_msisdn_validation_title" = "In attesa di verifica"; +"auth_msisdn_validation_message" = "Un SMS è stato spedito con il codice di attivazione. Per favore inserisci il codice qui sotto."; +"auth_msisdn_validation_error" = "Impossibile verificare il numero di telefono."; +"auth_reset_password_message" = "Per ripristinare la password, inserisci l'indirizzo email associato al tuo account:"; From 7b322ebce5851fc0e661f14f75ff0cdc9e67e4a2 Mon Sep 17 00:00:00 2001 From: Paulo Miranda Date: Mon, 11 Mar 2019 02:09:00 +0000 Subject: [PATCH 72/73] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (618 of 618 strings) Translation: Riot iOS/Riot iOS Translate-URL: http://translate.riot.im/projects/riot-ios/riot-ios/pt_BR/ --- Riot/Assets/pt_BR.lproj/Vector.strings | 103 +++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/Riot/Assets/pt_BR.lproj/Vector.strings b/Riot/Assets/pt_BR.lproj/Vector.strings index 81310fb58..e217e9688 100644 --- a/Riot/Assets/pt_BR.lproj/Vector.strings +++ b/Riot/Assets/pt_BR.lproj/Vector.strings @@ -556,3 +556,106 @@ // Re-request confirmation dialog "rerequest_keys_alert_title" = "Requisição enviada"; "rerequest_keys_alert_message" = "Por favor, inicie o Riot em outro dispositivo que possa descriptografar a mensagem para que ela possa enviar as chaves para este dispositivo."; +// String for App Store +"store_short_description" = "Chat/VoIP seguro e descentralizado"; +"store_full_description" = "Comunique-se do seu jeito.\n\nUm aplicativo de bate-papo, sob seu controle e totalmente flexível. Riot permite que você se comunique do jeito que você quer. Desenvolvido para o [matrix] - o padrão para comunicação aberta e descentralizada.\n\nObtenha uma conta matrix.org grátis, obtenha seu próprio servidor em https://modular.im ou use outro servidor Matrix.\n\nPor que escolher o Riot.im?\n\n• COMUNICAÇÃO COMPLETA: Construa salas em torno de suas equipes, seus amigos, sua comunidade - como quiser! Converse, compartilhe arquivos, adicione widgets e faça chamadas de voz e vídeo - tudo de graça.\n\n• INTEGRAÇÕES PODEROSAS: Use o Riot.im com as ferramentas que você conhece e ama. Com Riot.im você pode conversar com usuários e grupos em outros aplicativos de bate-papo.\n\n• PRIVADO E SEGURO: Mantenha suas conversas em segredo. A criptografia de ponta a ponta do estado da arte garante que a comunicação privada permaneça privada.\n\n• ABERTO, NÃO FECHADO: Código aberto e construído sobre o Matrix. Possua seus próprios dados hospedando seu próprio servidor ou selecionando um que você confia.\n\n• EM TODOS OS LUGARES: Mantenha-se em contato onde quer que esteja com o histórico de mensagens totalmente sincronizado em todos os seus dispositivos e online em https://riot.im."; +"auth_login_single_sign_on" = "Entre com o logon único"; +"auth_autodiscover_invalid_response" = "Resposta de descoberta inválida do homeserver"; +"room_message_unable_open_link_error_message" = "Não foi possível abrir o link."; +"settings_key_backup" = "BACKUP DA CHAVE"; +"settings_key_backup_info" = "As mensagens criptografadas são protegidas com criptografia de ponta a ponta. Somente você e o(s) destinatário(s) têm as chaves para ler essas mensagens."; +"settings_key_backup_info_checking" = "Checando..."; +"settings_key_backup_info_none" = "O Backup de suas chaves não estão sendo realizado a partir desse dispositivo."; +"settings_key_backup_info_signout_warning" = "Faça o backup das suas chaves antes de sair, para evitar perdê-las."; +"settings_key_backup_info_version" = "Versão da chave de Backup: %@"; +"settings_key_backup_info_algorithm" = "Algoritmo: %@"; +"settings_key_backup_info_valid" = "Este dispositivo está fazendo o backup de suas chaves."; +"settings_key_backup_info_not_valid" = "Este dispositivo não está fazendo o Backup de suas chaves."; +"settings_key_backup_info_progress" = "Fazendo o Backup das chaves %@ ..."; +"settings_key_backup_info_progress_done" = "O Backup de todas as chaves foi realizado"; +"settings_key_backup_info_trust_signature_unknown" = "O Backup tem uma assinatura do dispositivo com o ID: %@"; +"settings_key_backup_info_trust_signature_valid" = "O Backup tem uma assinatura válida deste dispositivo"; +"settings_key_backup_info_trust_signature_valid_device_verified" = "O Backup tem uma assinatura válida de %@"; +"settings_key_backup_info_trust_signature_valid_device_unverified" = "O Backup tem uma assinatura de %@"; +"settings_key_backup_info_trust_signature_invalid_device_verified" = "O Backup tem uma assinatura inválida de %@"; +"settings_key_backup_info_trust_signature_invalid_device_unverified" = "O Backup tem uma assinatura inválida de %@"; +"settings_key_backup_button_create" = "Comece a usar o Backup de chave"; +"settings_key_backup_button_restore" = "Restaurar do backup"; +"settings_key_backup_button_delete" = "Excluir Backup"; +"settings_key_backup_button_use" = "Usar Backup da chave"; +"settings_key_backup_delete_confirmation_prompt_title" = "Excluir Backup"; +"settings_key_backup_delete_confirmation_prompt_msg" = "Você tem certeza? Você perderá suas mensagens criptografadas se não for feito o backup correto de suas chaves."; +"room_does_not_exist" = "%@ não existe"; +// Key backup wrong version +"e2e_key_backup_wrong_version_title" = "Novo Backup de Chave"; +"e2e_key_backup_wrong_version" = "Um novo backup de chave de mensagem segura foi detectado.\n\nSe não foi você, defina uma nova frase secreta em \"Configurações\"."; +"e2e_key_backup_wrong_version_button_settings" = "Configurações"; +"e2e_key_backup_wrong_version_button_wasme" = "Foi eu"; +"key_backup_setup_title" = "Backup da Chave"; +"key_backup_setup_skip_alert_title" = "Você tem certeza?"; +"key_backup_setup_skip_alert_message" = "Você pode perder mensagens seguras se sair ou perder o seu dispositivo."; +"key_backup_setup_skip_alert_skip_action" = "Pular"; +"key_backup_setup_intro_title" = "Nunca perca mensagens criptografadas"; +"key_backup_setup_intro_info" = "As mensagens em salas criptografadas são protegidas com criptografia de ponta a ponta. Somente você e o(s) destinatário(s) têm as chaves para ler essas mensagens.\n\nFaça backup de suas chaves com segurança para evitar perdê-las."; +"key_backup_setup_intro_setup_action_without_existing_backup" = "Comece a usar o Backup de chave"; +"key_backup_setup_intro_setup_action_with_existing_backup" = "Usar Backup de Chave"; +"key_backup_setup_intro_manual_export_info" = "(Avançado)"; +"key_backup_setup_intro_manual_export_action" = "Exportar as chaves manualmente"; +"key_backup_setup_passphrase_title" = "Proteja seu backup com uma frase secreta"; +"key_backup_setup_passphrase_info" = "Nós vamos armazenar uma cópia criptografada de suas chaves em nosso servidor. Proteja seu backup com uma frase secreta para mantê-lo seguro.\n\nPara segurança máxima, isso deve ser diferente da senha da sua conta."; +"key_backup_setup_passphrase_passphrase_title" = "Entrar"; +"key_backup_setup_passphrase_passphrase_placeholder" = "Digite a senha"; +"key_backup_setup_passphrase_passphrase_valid" = "Ótimo!"; +"key_backup_setup_passphrase_passphrase_invalid" = "Tente adicionar uma palavra"; +"key_backup_setup_passphrase_confirm_passphrase_title" = "Confirme"; +"key_backup_setup_passphrase_confirm_passphrase_placeholder" = "Confirme a senha"; +"key_backup_setup_passphrase_confirm_passphrase_valid" = "Ótimo!"; +"key_backup_setup_passphrase_confirm_passphrase_invalid" = "As senhas não conferem"; +"key_backup_setup_passphrase_set_passphrase_action" = "Definir a frase secreta"; +"key_backup_setup_passphrase_setup_recovery_key_info" = "Ou, proteja seu backup com uma chave de recuperação, salvando-a em algum lugar seguro."; +"key_backup_setup_passphrase_setup_recovery_key_action" = "(Avançado) Configurar com chave de recuperação"; +"key_backup_setup_success_title" = "Sucesso!"; +// Success from passphrase +"key_backup_setup_success_from_passphrase_info" = "Suas chaves estão sendo copiadas.\n\nSua chave de recuperação é uma rede de segurança - você pode usá-la para restaurar o acesso às suas mensagens criptografadas se esquecer sua frase secreta.\n\nMantenha sua chave de recuperação em algum lugar muito seguro, como um gerenciador de senhas (ou um cofre)."; +"key_backup_setup_success_from_passphrase_save_recovery_key_action" = "Salvar chave de recuperação"; +"key_backup_setup_success_from_passphrase_done_action" = "Feito"; +// Success from recovery key +"key_backup_setup_success_from_recovery_key_info" = "Suas chaves estão sendo copiadas.\n\nFaça uma cópia dessa chave de recuperação e mantenha-a segura."; +"key_backup_setup_success_from_recovery_key_recovery_key_title" = "Chave de recuperação"; +"key_backup_setup_success_from_recovery_key_make_copy_action" = "Faça uma cópia"; +"key_backup_setup_success_from_recovery_key_made_copy_action" = "Eu já fiz uma cópia"; +"key_backup_recover_title" = "Mensagens seguras"; +"key_backup_recover_invalid_passphrase_title" = "Senha de recuperação incorreta"; +"key_backup_recover_invalid_passphrase" = "O Backup não pôde ser descriptografado com essa frase secreta: verifique se você digitou a frase secreta de recuperação correta."; +"key_backup_recover_invalid_recovery_key_title" = "Incompatibilidade de chave de recuperação"; +"key_backup_recover_invalid_recovery_key" = "O Backup não pôde ser descriptografado com essa chave: verifique se você inseriu a chave de recuperação correta."; +"key_backup_recover_from_passphrase_info" = "Use sua frase secreta de recuperação para desbloquear seu histórico de mensagens seguras"; +"key_backup_recover_from_passphrase_passphrase_title" = "Entrar"; +"key_backup_recover_from_passphrase_passphrase_placeholder" = "Digite a frase secreta"; +"key_backup_recover_from_passphrase_recover_action" = "Desbloquear Histórico"; +"key_backup_recover_from_passphrase_lost_passphrase_action_part1" = "Não sabe sua senha de recuperação? Você pode "; +"key_backup_recover_from_passphrase_lost_passphrase_action_part2" = "use sua chave de recuperação"; +"key_backup_recover_from_passphrase_lost_passphrase_action_part3" = "."; +"key_backup_recover_from_recovery_key_info" = "Use sua chave de recuperação para desbloquear seu histórico de mensagens seguras"; +"key_backup_recover_from_recovery_key_recovery_key_title" = "Entrar"; +"key_backup_recover_from_recovery_key_recovery_key_placeholder" = "Digite a chave de recuperação"; +"key_backup_recover_from_recovery_key_recover_action" = "Desbloquear Histórico"; +"key_backup_recover_from_recovery_key_lost_recovery_key_action" = "Perdeu sua chave de recuperação? Você pode configurar uma nova nas configurações."; +"key_backup_recover_success_info" = "Backup restaurado!"; +"key_backup_recover_done_action" = "Feito"; +"key_backup_setup_banner_title" = "Nunca perca mensagens criptografadas"; +"key_backup_setup_banner_subtitle" = "Comece a usar o Backup de chave"; +"key_backup_recover_banner_title" = "Nunca perca mensagens criptografadas"; +"key_backup_recover_banner_subtitle" = "Use o backup de chave"; +"sign_out_existing_key_backup_alert_title" = "Você tem certeza que deseja sair?"; +"sign_out_existing_key_backup_alert_sign_out_action" = "Sair"; +"sign_out_non_existing_key_backup_alert_title" = "Você perderá o acesso às suas mensagens criptografadas se sair agora"; +"sign_out_non_existing_key_backup_alert_setup_key_backup_action" = "Comece a usar o Backup de chave"; +"sign_out_non_existing_key_backup_alert_discard_key_backup_action" = "Eu não quero minhas mensagens criptografadas"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_title" = "Você perderá suas mensagens criptografadas"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_message" = "Você perderá o acesso às suas mensagens criptografadas, a menos que faça o backup das suas chaves antes de sair."; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_sign_out_action" = "Sair"; +"sign_out_non_existing_key_backup_sign_out_confirmation_alert_backup_action" = "Backup"; +"sign_out_key_backup_in_progress_alert_title" = "Backup de chave em andamento. Se você sair agora, perderá o acesso às suas mensagens criptografadas."; +"sign_out_key_backup_in_progress_alert_discard_key_backup_action" = "Eu não quero minhas mensagens criptografadas"; +"sign_out_key_backup_in_progress_alert_cancel_action" = "Eu vou esperar"; From 847d08f3164bcd16e3676ef6ba20da2f73641ea0 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Mon, 11 Mar 2019 12:01:26 +0100 Subject: [PATCH 73/73] version++ --- CHANGES.rst | 7 ++++++- Podfile | 2 +- Podfile.lock | 44 ++++++++++++++++++++++---------------------- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index eb248eb88..a6bade52f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,9 @@ -Changes in 0.8.2 (2019-xx-xx) +Changes in 0.8.3 (2019-xx-xx) +=============================================== + + + +Changes in 0.8.2 (2019-03-11) =============================================== Improvements: diff --git a/Podfile b/Podfile index ca5ffda02..a7ac4d707 100644 --- a/Podfile +++ b/Podfile @@ -7,7 +7,7 @@ use_frameworks! # Different flavours of pods to MatrixKit # The current MatrixKit pod version -$matrixKitVersion = '0.9.5' +$matrixKitVersion = '0.9.6' # The develop branch version #$matrixKitVersion = 'develop' diff --git a/Podfile.lock b/Podfile.lock index 026cab9c0..a8d29c768 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -44,38 +44,38 @@ PODS: - HPGrowingTextView (1.1) - libbase58 (0.1.4) - libPhoneNumber-iOS (0.9.13) - - MatrixKit (0.9.5): + - MatrixKit (0.9.6): - cmark (~> 0.24.1) - DTCoreText (~> 1.6.21) - HPGrowingTextView (~> 1.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixKit/Core (= 0.9.5) - - MatrixSDK (= 0.12.2) - - MatrixKit/AppExtension (0.9.5): + - MatrixKit/Core (= 0.9.6) + - MatrixSDK (= 0.12.3) + - MatrixKit/AppExtension (0.9.6): - cmark (~> 0.24.1) - DTCoreText (~> 1.6.21) - DTCoreText/Extension - HPGrowingTextView (~> 1.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixSDK (= 0.12.2) - - MatrixKit/Core (0.9.5): + - MatrixSDK (= 0.12.3) + - MatrixKit/Core (0.9.6): - cmark (~> 0.24.1) - DTCoreText (~> 1.6.21) - HPGrowingTextView (~> 1.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixSDK (= 0.12.2) - - MatrixSDK (0.12.2): - - MatrixSDK/Core (= 0.12.2) - - MatrixSDK/Core (0.12.2): + - MatrixSDK (= 0.12.3) + - MatrixSDK (0.12.3): + - MatrixSDK/Core (= 0.12.3) + - MatrixSDK/Core (0.12.3): - AFNetworking (~> 3.2.0) - GZIP (~> 1.2.2) - libbase58 (~> 0.1.4) - OLMKit (~> 3.0.0) - - Realm (~> 3.11.1) - - MatrixSDK/JingleCallStack (0.12.2): + - Realm (~> 3.13.1) + - MatrixSDK/JingleCallStack (0.12.3): - MatrixSDK/Core - WebRTC (= 63.11.20455) - - MatrixSDK/SwiftSupport (0.12.2): + - MatrixSDK/SwiftSupport (0.12.3): - MatrixSDK/Core - OLMKit (3.0.0): - OLMKit/olmc (= 3.0.0) @@ -85,9 +85,9 @@ PODS: - PiwikTracker (4.4.2): - PiwikTracker/Core (= 4.4.2) - PiwikTracker/Core (4.4.2) - - Realm (3.11.2): - - Realm/Headers (= 3.11.2) - - Realm/Headers (3.11.2) + - Realm (3.13.1): + - Realm/Headers (= 3.13.1) + - Realm/Headers (3.13.1) - Reusable (4.0.5): - Reusable/Storyboard (= 4.0.5) - Reusable/View (= 4.0.5) @@ -102,8 +102,8 @@ DEPENDENCIES: - cmark - DTCoreText - GBDeviceInfo (~> 5.2.0) - - MatrixKit (= 0.9.5) - - MatrixKit/AppExtension (= 0.9.5) + - MatrixKit (= 0.9.6) + - MatrixKit/AppExtension (= 0.9.6) - MatrixSDK/JingleCallStack - MatrixSDK/SwiftSupport - OLMKit @@ -154,17 +154,17 @@ SPEC CHECKSUMS: HPGrowingTextView: 88a716d97fb853bcb08a4a08e4727da17efc9b19 libbase58: 7c040313537b8c44b6e2d15586af8e21f7354efd libPhoneNumber-iOS: e444379ac18bbfbdefad571da735b2cd7e096caa - MatrixKit: 97bfda595111fe052ea8dbe74f5f65e2eca104a6 - MatrixSDK: 60a9472eacdf51e5110b8bc7beba844debf992ef + MatrixKit: 3cc6fdb1254a076875215d43b5b8100f136634c7 + MatrixSDK: 36c1a0da01a2745d4ffcca73e080610f05d47009 OLMKit: 88eda69110489f817d59bcb4353b7c247570aa4f PiwikTracker: 42862c7b13028065c3dfd36b4dc38db8a5765acf - Realm: 864477d028db77f7c5a0cba64a4892ad53db128a + Realm: 50071da38fe079e0735e47c9f2eae738c68c5996 Reusable: 188be1a54ac0691bc66e5bb24ec6eb91971b315b SwiftGen: f872ca75cbd17bf7103c17f13dcfa0d9a15667b0 SwiftLint: a54bf1fe12b55c68560eb2a7689dfc81458508f7 WebRTC: f2a6203584745fe53532633397557876b5d71640 zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c -PODFILE CHECKSUM: 3176215a897b46c2a49fe45e93d0a8b1f8a7b973 +PODFILE CHECKSUM: 1f4241c97f15817bdef6c94f78a778f7d175e103 COCOAPODS: 1.6.1