Skip to content

Commit

Permalink
Merge branch 'release/1.8.1/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Feb 16, 2022
2 parents 905a1ac + 4a055a2 commit 6898f51
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 33 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
@@ -1,3 +1,15 @@
## Changes in 1.8.1 (2022-02-16)

🙌 Improvements

- Upgrade MatrixSDK version ([v0.22.1](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.22.1)).

🐛 Bugfixes

- Settings: Fix a bug where tapping a toggle could change multiple settings. ([#5463](https://github.com/vector-im/element-ios/issues/5463))
- Fix for images sometimes being sent unencrypted inside an encrypted room. ([#5564](https://github.com/vector-im/element-ios/issues/5564))


## Changes in 1.8.0 (2022-02-09)

✨ Features
Expand Down
4 changes: 2 additions & 2 deletions Config/AppVersion.xcconfig
Expand Up @@ -15,5 +15,5 @@
//

// Version
MARKETING_VERSION = 1.8.0
CURRENT_PROJECT_VERSION = 1.8.0
MARKETING_VERSION = 1.8.1
CURRENT_PROJECT_VERSION = 1.8.1
2 changes: 1 addition & 1 deletion Podfile
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.22.0'
$matrixSDKVersion = '= 0.22.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
Expand Up @@ -57,16 +57,16 @@ PODS:
- LoggerAPI (1.9.200):
- Logging (~> 1.1)
- Logging (1.4.0)
- MatrixSDK (0.22.0):
- MatrixSDK/Core (= 0.22.0)
- MatrixSDK/Core (0.22.0):
- MatrixSDK (0.22.1):
- MatrixSDK/Core (= 0.22.1)
- MatrixSDK/Core (0.22.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.22.0):
- MatrixSDK/JingleCallStack (0.22.1):
- JitsiMeetSDK (= 3.10.2)
- MatrixSDK/Core
- OLMKit (3.2.5):
Expand Down Expand Up @@ -117,8 +117,8 @@ DEPENDENCIES:
- KeychainAccess (~> 4.2.2)
- KTCenterFlowLayout (~> 1.3.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (= 0.22.0)
- MatrixSDK/JingleCallStack (= 0.22.0)
- MatrixSDK (= 0.22.1)
- MatrixSDK/JingleCallStack (= 0.22.1)
- OLMKit
- PostHog (~> 1.4.4)
- ReadMoreTextView (~> 3.0.1)
Expand Down Expand Up @@ -212,7 +212,7 @@ SPEC CHECKSUMS:
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MatrixSDK: 21201cd007145d96beff24cc7f9727ced497c3fd
MatrixSDK: 12c1a56e037f629e493cbcd615fd13cfc58cee3a
OLMKit: 9fb4799c4a044dd2c06bda31ec31a12191ad30b5
PostHog: 4b6321b521569092d4ef3a02238d9435dbaeb99f
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
Expand All @@ -229,6 +229,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb

PODFILE CHECKSUM: 2a13c9d4f4894152af066c746582fde2e731cbff
PODFILE CHECKSUM: ae70a46e98aae87f130ad3d246711fc6b6ae7286

COCOAPODS: 1.11.2
11 changes: 9 additions & 2 deletions Riot/Modules/Room/MXKRoomViewController.h
Expand Up @@ -438,10 +438,17 @@ typedef NS_ENUM(NSUInteger, MXKRoomViewControllerJoinRoomResult) {
- (void)setBubbleTableViewContentOffset:(CGPoint)contentOffset animated:(BOOL)animated;

/**
Handle typing notification.
Sends a typing notification with the specified timeout.
@param typing Flag indicating whether the user is typing or not.
@param notificationTimeoutMS The length of time the typing notification is valid for
*/
- (void)handleTypingNotification:(BOOL)typing;
- (void)sendTypingNotification:(BOOL)typing timeout:(NSUInteger)notificationTimeoutMS;


/**
Share encryption keys in this room.
*/
- (void)shareEncryptionKeys;

@end
11 changes: 8 additions & 3 deletions Riot/Modules/Room/MXKRoomViewController.m
Expand Up @@ -3299,7 +3299,7 @@ - (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView isTyping:(BOO
roomDataSource.partialTextMessage = inputToolbarView.textMessage;
}

[self handleTypingNotification:typing];
[self handleTypingState:typing];
}

- (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView heightDidChanged:(CGFloat)height completion:(void (^)(BOOL finished))completion
Expand Down Expand Up @@ -3420,7 +3420,7 @@ - (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView updateActivit
}
# pragma mark - Typing notification

- (void)handleTypingNotification:(BOOL)typing
- (void)handleTypingState:(BOOL)typing
{
NSUInteger notificationTimeoutMS = -1;
if (typing)
Expand Down Expand Up @@ -3482,6 +3482,11 @@ - (void)handleTypingNotification:(BOOL)typing
lastTypingDate = nil;
}

[self sendTypingNotification:typing timeout:notificationTimeoutMS];
}

- (void)sendTypingNotification:(BOOL)typing timeout:(NSUInteger)notificationTimeoutMS
{
MXWeakify(self);

// Send typing notification to server
Expand Down Expand Up @@ -3512,7 +3517,7 @@ - (IBAction)typingTimeout:(id)sender
// Check whether a new typing event has been observed
BOOL typing = (lastTypingDate != nil);
// Post a new typing notification
[self handleTypingNotification:typing];
[self handleTypingState:typing];
}


Expand Down
9 changes: 9 additions & 0 deletions Riot/Modules/Room/RoomViewController.m
Expand Up @@ -4564,6 +4564,15 @@ - (void)roomInputToolbarViewDidChangeTextMessage:(MXKRoomInputToolbarView *)tool
[self.userSuggestionCoordinator processTextMessage:toolbarView.textMessage];
}

- (void)roomInputToolbarViewDidOpenActionMenu:(MXKRoomInputToolbarView*)toolbarView
{
// Consider opening the action menu as beginning to type and share encryption keys if requested.
if ([MXKAppSettings standardAppSettings].outboundGroupSessionKeyPreSharingStrategy == MXKKeyPreSharingWhenTyping)
{
[self shareEncryptionKeys];
}
}

#pragma mark - MXKRoomMemberDetailsViewControllerDelegate

- (void)roomMemberDetailsViewController:(MXKRoomMemberDetailsViewController *)roomMemberDetailsViewController startChatWithMemberId:(NSString *)matrixId completion:(void (^)(void))completion
Expand Down
7 changes: 7 additions & 0 deletions Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.h
Expand Up @@ -47,6 +47,13 @@ typedef enum : NSUInteger
*/
- (void)roomInputToolbarViewDidChangeTextMessage:(MXKRoomInputToolbarView*)toolbarView;

/**
Inform the delegate that the action menu was opened.
@param toolbarView the room input toolbar view
*/
- (void)roomInputToolbarViewDidOpenActionMenu:(MXKRoomInputToolbarView*)toolbarView;

@end

/**
Expand Down
Expand Up @@ -429,6 +429,7 @@ - (void)setActionMenuOpened:(BOOL)actionMenuOpened
if (_actionMenuOpened) {
self.actionsBar.hidden = NO;
[self.actionsBar animateWithShowIn:_actionMenuOpened completion:nil];
[self.delegate roomInputToolbarViewDidOpenActionMenu:self];
}
else
{
Expand Down
44 changes: 29 additions & 15 deletions Riot/Modules/Settings/SettingsViewController.m
Expand Up @@ -158,7 +158,8 @@ typedef NS_ENUM(NSUInteger, ABOUT)
typedef NS_ENUM(NSUInteger, LABS_ENABLE)
{
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0,
LABS_ENABLE_THREADS_INDEX
LABS_ENABLE_THREADS_INDEX,
LABS_ENABLE_MESSAGE_BUBBLES_INDEX
};

typedef NS_ENUM(NSUInteger, SECURITY)
Expand Down Expand Up @@ -508,7 +509,9 @@ - (void)updateSections

if (BuildSettings.roomScreenAllowTimelineStyleConfiguration)
{
[sectionUserInterface addRowWithTag:USER_INTERFACE_TIMELINE_STYLE_INDEX];
// NOTE: Message bubbles are under labs section atm

// [sectionUserInterface addRowWithTag:USER_INTERFACE_TIMELINE_STYLE_INDEX];
}

[tmpSections addObject: sectionUserInterface];
Expand Down Expand Up @@ -566,6 +569,7 @@ - (void)updateSections
Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS];
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
[sectionLabs addRowWithTag:LABS_ENABLE_THREADS_INDEX];
[sectionLabs addRowWithTag:LABS_ENABLE_MESSAGE_BUBBLES_INDEX];
sectionLabs.headerTitle = [VectorL10n settingsLabs];
if (sectionLabs.hasAnyRows)
{
Expand Down Expand Up @@ -1469,6 +1473,21 @@ - (NSString*)buildAboutSectionFooterTitleWithAccount:(MXKAccount*)account
return [footerText copy];
}

- (UITableViewCell *)buildMessageBubblesCellForTableView:(UITableView*)tableView
atIndexPath:(NSIndexPath*)indexPath
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];

labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsEnableRoomMessageBubbles];

labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenEnableMessageBubbles;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = YES;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRoomMessageBubbles:) forControlEvents:UIControlEventTouchUpInside];

return labelAndSwitchCell;
}

#pragma mark - 3Pid Add

- (void)showAuthenticationIfNeededForAdding:(MX3PIDMedium)medium withSession:(MXSession*)session completion:(void (^)(NSDictionary* authParams))completion
Expand Down Expand Up @@ -1976,7 +1995,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = YES;

[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableURLPreviews:) forControlEvents:UIControlEventValueChanged];
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableURLPreviews:) forControlEvents:UIControlEventTouchUpInside];

cell = labelAndSwitchCell;
}
Expand Down Expand Up @@ -2206,16 +2225,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}
else if (row == USER_INTERFACE_TIMELINE_STYLE_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];

labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsEnableRoomMessageBubbles];

labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenEnableMessageBubbles;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = YES;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRoomMessageBubbles:) forControlEvents:UIControlEventTouchUpInside];

cell = labelAndSwitchCell;
cell = [self buildMessageBubblesCellForTableView:tableView atIndexPath:indexPath];
}
}
else if (section == SECTION_TAG_IGNORED_USERS)
Expand Down Expand Up @@ -2430,7 +2440,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableRingingForGroupCalls;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;

[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRingingForGroupCalls:) forControlEvents:UIControlEventValueChanged];
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRingingForGroupCalls:) forControlEvents:UIControlEventTouchUpInside];

cell = labelAndSwitchCell;
}
Expand All @@ -2442,10 +2452,14 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableThreads;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;

[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableThreads:) forControlEvents:UIControlEventValueChanged];
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableThreads:) forControlEvents:UIControlEventTouchUpInside];

cell = labelAndSwitchCell;
}
else if (row == LABS_ENABLE_MESSAGE_BUBBLES_INDEX)
{
cell = [self buildMessageBubblesCellForTableView:tableView atIndexPath:indexPath];
}
}
else if (section == SECTION_TAG_FLAIR)
{
Expand Down
4 changes: 2 additions & 2 deletions Riot/Modules/Threads/Thread/ThreadViewController.swift
Expand Up @@ -70,8 +70,8 @@ class ThreadViewController: RoomViewController {
super.onButtonPressed(sender)
}

override func handleTypingNotification(_ typing: Bool) {
// no-op
override func sendTypingNotification(_ typing: Bool, timeout notificationTimeoutMS: UInt) {
// no-op
}

private func showThreadActions() {
Expand Down

0 comments on commit 6898f51

Please sign in to comment.