Skip to content

Commit

Permalink
Merge branch 'release/1.8.9/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Mar 28, 2022
2 parents 2ed7d24 + 2327642 commit 751fe14
Show file tree
Hide file tree
Showing 28 changed files with 426 additions and 146 deletions.
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## Changes in 1.8.9 (2022-03-28)

🙌 Improvements

- Upgrade MatrixSDK version ([v0.23.1](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.23.1)).
- Update suggested room preview to behave the same way in all cases ([#5771](https://github.com/vector-im/element-ios/issues/5771))
- Add "Invite people" to the space menu in the left panel and update menu order ([#5810](https://github.com/vector-im/element-ios/issues/5810))

🐛 Bugfixes

- Sync Spaces order with web ([#5134](https://github.com/vector-im/element-ios/issues/5134))
- Fixed "Add Space" error message ([#5797](https://github.com/vector-im/element-ios/issues/5797))
- Authentication: Ensure the login button is always visible ([#5875](https://github.com/vector-im/element-ios/issues/5875))
- Room: Fix typing performance by avoiding expensive UI operations ([#5906](https://github.com/vector-im/element-ios/issues/5906))
- Push notifications: show space preview if user taps invite notification ([#5915](https://github.com/vector-im/element-ios/issues/5915))


## Changes in 1.8.8 (2022-03-22)

✨ Features
Expand Down
4 changes: 2 additions & 2 deletions Config/AppVersion.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
//

// Version
MARKETING_VERSION = 1.8.8
CURRENT_PROJECT_VERSION = 1.8.8
MARKETING_VERSION = 1.8.9
CURRENT_PROJECT_VERSION = 1.8.9
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use_frameworks!
# - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI
#
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
$matrixSDKVersion = '= 0.23.0'
$matrixSDKVersion = '= 0.23.1'
# $matrixSDKVersion = :local
# $matrixSDKVersion = { :branch => 'develop'}
# $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } }
Expand Down
16 changes: 8 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ PODS:
- LoggerAPI (1.9.200):
- Logging (~> 1.1)
- Logging (1.4.0)
- MatrixSDK (0.23.0):
- MatrixSDK/Core (= 0.23.0)
- MatrixSDK/Core (0.23.0):
- MatrixSDK (0.23.1):
- MatrixSDK/Core (= 0.23.1)
- MatrixSDK/Core (0.23.1):
- AFNetworking (~> 4.0.0)
- GZIP (~> 1.3.0)
- libbase58 (~> 0.1.4)
- OLMKit (~> 3.2.5)
- Realm (= 10.16.0)
- SwiftyBeaver (= 1.9.5)
- MatrixSDK/JingleCallStack (0.23.0):
- MatrixSDK/JingleCallStack (0.23.1):
- JitsiMeetSDK (= 3.10.2)
- MatrixSDK/Core
- OLMKit (3.2.5):
Expand Down Expand Up @@ -115,8 +115,8 @@ DEPENDENCIES:
- KeychainAccess (~> 4.2.2)
- KTCenterFlowLayout (~> 1.3.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (= 0.23.0)
- MatrixSDK/JingleCallStack (= 0.23.0)
- MatrixSDK (= 0.23.1)
- MatrixSDK/JingleCallStack (= 0.23.1)
- OLMKit
- PostHog (~> 1.4.4)
- ReadMoreTextView (~> 3.0.1)
Expand Down Expand Up @@ -208,7 +208,7 @@ SPEC CHECKSUMS:
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MatrixSDK: 5934f25944388513d7a379cd5e191a231ceed45f
MatrixSDK: 54d16aa08f3043fb1bcf639ef1ac5c589100f39f
OLMKit: 9fb4799c4a044dd2c06bda31ec31a12191ad30b5
PostHog: 4b6321b521569092d4ef3a02238d9435dbaeb99f
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
Expand All @@ -225,6 +225,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb

PODFILE CHECKSUM: 426c919fd3f444aa747155bfcc20f9092573f1aa
PODFILE CHECKSUM: 820f04e07aa252459ecfa88d04da729daca4fcbb

COCOAPODS: 1.11.3
2 changes: 2 additions & 0 deletions Riot/Assets/en.lproj/Untranslated.strings
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@
"onboarding_avatar_accessibility_label" = "Profile picture";

"image_picker_action_files" = "Choose from files";

"spaces_feature_not_available" = "This feature isn't available here. For now, you can do this with %@ on your computer.";
4 changes: 4 additions & 0 deletions Riot/Generated/UntranslatedStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public extension VectorL10n {
static var onboardingPersonalizationSkip: String {
return VectorL10n.tr("Untranslated", "onboarding_personalization_skip")
}
/// This feature isn't available here. For now, you can do this with %@ on your computer.
static func spacesFeatureNotAvailable(_ p1: String) -> String {
return VectorL10n.tr("Untranslated", "spaces_feature_not_available", p1)
}
}
// swiftlint:enable function_parameter_count identifier_name line_length type_body_length

4 changes: 3 additions & 1 deletion Riot/Managers/PushNotification/PushNotificationService.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ NS_ASSUME_NONNULL_BEGIN
@param pushNotificationService PushNotificationService object.
@param roomId Room identifier to be navigated.
@param userId ID of sender of the notification.
*/
- (void)pushNotificationService:(PushNotificationService *)pushNotificationService
shouldNavigateToRoomWithId:(NSString *)roomId
threadId:(nullable NSString *)threadId;
threadId:(nullable NSString *)threadId
sender:(nullable NSString *)userId;

@end;

Expand Down
9 changes: 5 additions & 4 deletions Riot/Managers/PushNotification/PushNotificationService.m
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNoti
NSString *actionIdentifier = [response actionIdentifier];
NSString *roomId = content.userInfo[@"room_id"];
NSString *threadId = content.userInfo[@"thread_id"];
NSString *userId = content.userInfo[@"user_id"];

if ([actionIdentifier isEqualToString:@"inline-reply"])
{
Expand Down Expand Up @@ -403,7 +404,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNoti
}
else if ([actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier])
{
[self notifyNavigateToRoomById:roomId threadId:threadId];
[self notifyNavigateToRoomById:roomId threadId:threadId sender:userId];
completionHandler();
}
else
Expand Down Expand Up @@ -567,11 +568,11 @@ - (void)removeDeliveredNotificationsWithRoomId:(NSString*)roomId completion:(dis

#pragma mark - Delegate Notifiers

- (void)notifyNavigateToRoomById:(NSString *)roomId threadId:(NSString *)threadId
- (void)notifyNavigateToRoomById:(NSString *)roomId threadId:(NSString *)threadId sender:(NSString *)userId
{
if ([_delegate respondsToSelector:@selector(pushNotificationService:shouldNavigateToRoomWithId:threadId:)])
if ([_delegate respondsToSelector:@selector(pushNotificationService:shouldNavigateToRoomWithId:threadId:sender:)])
{
[_delegate pushNotificationService:self shouldNavigateToRoomWithId:roomId threadId:threadId];
[_delegate pushNotificationService:self shouldNavigateToRoomWithId:roomId threadId:threadId sender:userId];
}
}

Expand Down
50 changes: 35 additions & 15 deletions Riot/Modules/Application/LegacyAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,7 @@ - (void)checkExceptionToReport
- (void)pushNotificationService:(PushNotificationService *)pushNotificationService
shouldNavigateToRoomWithId:(NSString *)roomId
threadId:(NSString *)threadId
sender:(NSString *)userId
{
if (roomId)
{
Expand All @@ -1123,7 +1124,7 @@ - (void)pushNotificationService:(PushNotificationService *)pushNotificationServi
}

_lastNavigatedRoomIdFromPush = roomId;
[self navigateToRoomById:roomId threadId:threadId];
[self navigateToRoomById:roomId threadId:threadId sender:userId];
}

#pragma mark - Badge Count
Expand Down Expand Up @@ -2912,7 +2913,7 @@ - (void)selectMatrixAccount:(void (^)(MXKAccount *selectedAccount))onSelection

#pragma mark - Matrix Rooms handling

- (void)navigateToRoomById:(NSString *)roomId threadId:(NSString *)threadId
- (void)navigateToRoomById:(NSString *)roomId threadId:(NSString *)threadId sender:(NSString *)userId
{
if (roomId.length)
{
Expand Down Expand Up @@ -2949,7 +2950,8 @@ - (void)navigateToRoomById:(NSString *)roomId threadId:(NSString *)threadId
[self showRoom:roomId
threadId:threadId
andEventId:nil
withMatrixSession:dedicatedAccount.mxSession];
withMatrixSession:dedicatedAccount.mxSession
sender:userId];
}
else
{
Expand All @@ -2967,7 +2969,6 @@ - (void)showRoomWithParameters:(RoomNavigationParameters*)parameters completion:
{
NSString *roomId = parameters.roomId;
MXSession *mxSession = parameters.mxSession;
BOOL restoreInitialDisplay = parameters.presentationParameters.restoreInitialDisplay;

if (roomId && mxSession)
{
Expand All @@ -2978,21 +2979,38 @@ - (void)showRoomWithParameters:(RoomNavigationParameters*)parameters completion:
[Analytics.shared trackViewRoom:room];
}

// Indicates that spaces are not supported
if (room.summary.roomType == MXRoomTypeSpace)
if (!room)
{

[self.spaceFeatureUnavailablePresenter presentUnavailableFeatureFrom:self.presentedViewController animated:YES];

if (completion)
{
completion();
}
MXWeakify(self);
[mxSession.matrixRestClient roomSummaryWith:roomId via:@[] success:^(MXPublicRoom *room) {
MXStrongifyAndReturnIfNil(self);
if ([room.roomTypeString isEqualToString:MXRoomTypeStringSpace])
{
SpacePreviewNavigationParameters *spacePreviewNavigationParameters = [[SpacePreviewNavigationParameters alloc] initWithPublicRoom:room mxSession:mxSession senderId:parameters.senderId presentationParameters:parameters.presentationParameters];
[self showSpacePreviewWithParameters:spacePreviewNavigationParameters];
}
else
{
[self finaliseShowRoomWithParameters:parameters completion:completion];
}
} failure:^(NSError *error) {
MXStrongifyAndReturnIfNil(self);
[self finaliseShowRoomWithParameters:parameters completion:completion];
}];

return;
}

}

[self finaliseShowRoomWithParameters:parameters completion:completion];
}

- (void)finaliseShowRoomWithParameters:(RoomNavigationParameters*)parameters completion:(void (^)(void))completion
{
NSString *roomId = parameters.roomId;
BOOL restoreInitialDisplay = parameters.presentationParameters.restoreInitialDisplay;

void (^selectRoom)(void) = ^() {
// Select room to display its details (dispatch this action in order to let TabBarController end its refresh)

Expand Down Expand Up @@ -3021,10 +3039,10 @@ - (void)showRoomWithParameters:(RoomNavigationParameters*)parameters completion:

- (void)showRoom:(NSString*)roomId andEventId:(NSString*)eventId withMatrixSession:(MXSession*)mxSession
{
[self showRoom:roomId threadId:nil andEventId:eventId withMatrixSession:mxSession];
[self showRoom:roomId threadId:nil andEventId:eventId withMatrixSession:mxSession sender:nil];
}

- (void)showRoom:(NSString*)roomId threadId:(NSString*)threadId andEventId:(NSString*)eventId withMatrixSession:(MXSession*)mxSession
- (void)showRoom:(NSString*)roomId threadId:(NSString*)threadId andEventId:(NSString*)eventId withMatrixSession:(MXSession*)mxSession sender:(NSString*)userId
{
// Ask to restore initial display
ScreenPresentationParameters *presentationParameters = [[ScreenPresentationParameters alloc] initWithRestoreInitialDisplay:YES];
Expand All @@ -3038,6 +3056,7 @@ - (void)showRoom:(NSString*)roomId threadId:(NSString*)threadId andEventId:(NSSt
RoomNavigationParameters *parameters = [[RoomNavigationParameters alloc] initWithRoomId:roomId
eventId:eventId
mxSession:mxSession
senderId:userId
threadParameters:threadParameters
presentationParameters:presentationParameters];

Expand Down Expand Up @@ -3097,6 +3116,7 @@ - (void)showSpacePreviewWithParameters:(SpacePreviewNavigationParameters*)parame

void(^showSpace)(void) = ^{
[self.spaceDetailPresenter presentForSpaceWithPublicRoom:parameters.publicRoom
senderId:parameters.senderId
from:presentingViewController
sourceView:sourceView
session:parameters.mxSession
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class RoomNavigationParameters: NSObject {
/// If `true`, the room settings screen will be initially displayed. Default `false`
let showSettingsInitially: Bool

/// ID of the sender of the notification. Default `nil`
let senderId: String?

// MARK: - Setup

init(roomId: String,
Expand All @@ -71,6 +74,24 @@ class RoomNavigationParameters: NSObject {
self.threadParameters = threadParameters
self.presentationParameters = presentationParameters
self.showSettingsInitially = false
self.senderId = nil

super.init()
}

init(roomId: String,
eventId: String?,
mxSession: MXSession,
senderId: String?,
threadParameters: ThreadParameters?,
presentationParameters: ScreenPresentationParameters) {
self.roomId = roomId
self.eventId = eventId
self.mxSession = mxSession
self.threadParameters = threadParameters
self.presentationParameters = presentationParameters
self.showSettingsInitially = false
self.senderId = senderId

super.init()
}
Expand All @@ -86,7 +107,8 @@ class RoomNavigationParameters: NSObject {
self.presentationParameters = presentationParameters
self.showSettingsInitially = showSettingsInitially
self.threadParameters = nil

self.senderId = nil

super.init()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,28 @@ class SpacePreviewNavigationParameters: SpaceNavigationParameters {
/// The data for the room preview
let publicRoom: MXPublicRoom

/// The ID of the sender of the invite
let senderId: String?

// MARK: - Setup

init(publicRoom: MXPublicRoom,
mxSession: MXSession,
presentationParameters: ScreenPresentationParameters) {
self.publicRoom = publicRoom
self.senderId = nil

super.init(roomId: publicRoom.roomId,
mxSession: mxSession,
presentationParameters: presentationParameters)
}

init(publicRoom: MXPublicRoom,
mxSession: MXSession,
senderId: String?,
presentationParameters: ScreenPresentationParameters) {
self.publicRoom = publicRoom
self.senderId = senderId

super.init(roomId: publicRoom.roomId,
mxSession: mxSession,
Expand Down
2 changes: 0 additions & 2 deletions Riot/Modules/Authentication/AuthenticationViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
@property (weak, nonatomic) IBOutlet UIButton *skipButton;
@property (weak, nonatomic) IBOutlet UIButton *forgotPasswordButton;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *submitButtonMinLeadingConstraint;

@property (weak, nonatomic) IBOutlet UIView *serverOptionsContainer;
@property (weak, nonatomic) IBOutlet UIButton *customServersTickButton;
@property (weak, nonatomic) IBOutlet UIView *customServersContainer;
Expand Down
11 changes: 0 additions & 11 deletions Riot/Modules/Authentication/AuthenticationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1058,17 +1058,6 @@ - (void)updateForgotPwdButtonVisibility
}

self.forgotPasswordButton.hidden = !showForgotPasswordButton;

// Adjust minimum leading constraint of the submit button
if (self.forgotPasswordButton.isHidden)
{
self.submitButtonMinLeadingConstraint.constant = 19;
}
else
{
CGRect frame = self.forgotPasswordButton.frame;
self.submitButtonMinLeadingConstraint.constant = frame.origin.x + frame.size.width + 10;
}
}

- (void)afterSetPinFlowCompletedWithCredentials:(MXCredentials*)credentials
Expand Down
Loading

0 comments on commit 751fe14

Please sign in to comment.