Skip to content

Commit

Permalink
Release 1.9.6 (#6747)
Browse files Browse the repository at this point in the history
* Device manager: add user sessions overview current session strings.

* Create UserSessionCardView to display session informations.

* UserSessionsOverview: Handle current session section view.

* Prepare for new sprint

* Dismiss the launching screen when clearing cache.

* Fix crash when previewing a room.

* Fix typo in empty state

* Code review fixes

* Update swift-ogg and add changelog

* Fix crash on logout from too much wrong pin codes

* Update changelog to original issue

* Disable unnecessary network breadcrumbs in Sentry

* Changelog

* Fix login crash on Xcode 14 builds

Fixes #6722

* Put the session creator on the main actor instead.

This covers all login and registration options.

* Only disable the composer if the room is yet to be created.

* Add missing source views for iPad.

* New App Layout: fixed rooms list doesn't update after log out and log into another account

* New layout: Fixed low priority rooms titles obscured by bottom bar when side scrolling

* Fix replied event content parsing for nested replies

* Fixed failed to join room (was not legal room)

* Timeline composer layout loop fix (#6743)

* Publish suitable view height for user suggestions

* Update container view height

* Add changelog

* Fix user suggestions layout for pre iOS 16

* version++

Co-authored-by: SBiOSoftWhare <[email protected]>
Co-authored-by: Doug <[email protected]>
Co-authored-by: Germain Souquet <[email protected]>
Co-authored-by: Stefan Ceriu <[email protected]>
Co-authored-by: Aleksandrs Proskurins <[email protected]>
Co-authored-by: David Langley <[email protected]>
Co-authored-by: aringenbach <[email protected]>
Co-authored-by: aringenbach <[email protected]>
Co-authored-by: Andy Uhnak <[email protected]>
Co-authored-by: Johannes Marbach <[email protected]>
Co-authored-by: Gil Eluard <[email protected]>
Co-authored-by: Gil Eluard <[email protected]>
Co-authored-by: gulekismail <[email protected]>
  • Loading branch information
14 people authored Sep 20, 2022
1 parent a7b7fff commit fbf78b4
Show file tree
Hide file tree
Showing 29 changed files with 481 additions and 48 deletions.
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## Changes in 1.9.6 (2022-09-20)

🙌 Improvements

- Sentry: Disable unnecessary network breadcrumbs ([#6726](https://github.com/vector-im/element-ios/pull/6726))

🐛 Bugfixes

- Fix crash when some opus audio files are added to a room. ([#6584](https://github.com/vector-im/element-ios/issues/6584))
- Fixed failed to join room (was not legal room) ([#6653](https://github.com/vector-im/element-ios/issues/6653))
- Fix crash presenting Sign Out or Invite to Element menu items on iPad. ([#6654](https://github.com/vector-im/element-ios/issues/6654))
- Fix crash on logout when syncing is currently in progress ([#6705](https://github.com/vector-im/element-ios/issues/6705))
- New layout: Fixed Low priority rooms titles obscured by bottom bar when side scrolling ([#6707](https://github.com/vector-im/element-ios/issues/6707))
- Message Composer: Stop the keyboard jumping after sending a message on certain devices. ([#6708](https://github.com/vector-im/element-ios/issues/6708))
- New App Layout: Make sure the green loading spinner is dismissed after clearing the cache. ([#6709](https://github.com/vector-im/element-ios/issues/6709))
- Fix a crash when previewing a room. ([#6712](https://github.com/vector-im/element-ios/issues/6712))
- Fix login crash on Xcode 14 builds ([#6722](https://github.com/vector-im/element-ios/issues/6722))
- Fix replied event content parsing for nested replies ([#6729](https://github.com/vector-im/element-ios/issues/6729))
- Room: Fix a composer crash after long unsent messages. ([#6734](https://github.com/vector-im/element-ios/issues/6734))
- New App Layout: fixed rooms list doesn't update after log out and log into another account ([#6739](https://github.com/vector-im/element-ios/issues/6739))


## Changes in 1.9.5 (2022-09-12)

🐛 Bugfixes
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.9.5
CURRENT_PROJECT_VERSION = 1.9.5
MARKETING_VERSION = 1.9.6
CURRENT_PROJECT_VERSION = 1.9.6
2 changes: 1 addition & 1 deletion Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"location" : "https://github.com/vector-im/swift-ogg",
"state" : {
"branch" : "main",
"revision" : "0ffad3f7b45a6a4760db090d503b00f094bbecc0"
"revision" : "e9a9e7601da662fd8b97d93781ff5c60b4becf88"
}
}
],
Expand Down
10 changes: 9 additions & 1 deletion Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2187,7 +2187,7 @@ Tap the + to start adding people.";
"all_chats_empty_space_information" = "Spaces are a new way to group rooms and people. Add an existing room, or create a new one, using the bottom-right button.";
"all_chats_empty_view_information" = "The all-in-one secure chat app for teams, friends and organisations. Create a chat, or join an existing room, to get started.";
"all_chats_empty_list_placeholder_title" = "You’re all caught up.";
"all_chats_empty_unreads_placeholder_message" = "This is where you're unread messages will show up, when you have some.";
"all_chats_empty_unreads_placeholder_message" = "This is where your unread messages will show up, when you have some.";
"all_chats_nothing_found_placeholder_title" = "Nothing found.";
"all_chats_nothing_found_placeholder_message" = "Try adjusting your search.";

Expand Down Expand Up @@ -2361,11 +2361,19 @@ To enable access, tap Settings> Location and select Always";
"user_sessions_overview_other_sessions_section_title" = "OTHER SESSIONS";
"user_sessions_overview_other_sessions_section_info" = "For best security, verify your sessions and sign out from any session that you don’t recognize or use anymore.";

"user_sessions_overview_current_session_section_title" = "CURRENT SESSION";

"user_session_verified" = "Verified session";
"user_session_unverified" = "Unverified session";
"user_session_verified_short" = "Verified";
"user_session_unverified_short" = "Unverified";

"user_session_verify_action" = "Verify session";
"user_session_view_details" = "View details";
"user_session_learn_more" = "Learn more";
"user_session_verified_additional_info" = "Your current session is ready for secure messaging.";
"user_session_unverified_additional_info" = "Verify your current session for enhanced secure messaging.";

// First item is client name and second item is session display name
"user_session_name" = "%@: %@";

Expand Down
3 changes: 0 additions & 3 deletions Riot/Generated/Images.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,13 @@ internal class Asset: NSObject {
internal static let encryptionWarning = ImageAsset(name: "encryption_warning")
internal static let favouritesEmptyScreenArtwork = ImageAsset(name: "favourites_empty_screen_artwork")
internal static let favouritesEmptyScreenArtworkDark = ImageAsset(name: "favourites_empty_screen_artwork_dark")
internal static let allChatRecents = ImageAsset(name: "all_chat_recents")
internal static let allChatUnreads = ImageAsset(name: "all_chat_unreads")
internal static let roomActionDirectChat = ImageAsset(name: "room_action_direct_chat")
internal static let roomActionFavourite = ImageAsset(name: "room_action_favourite")
internal static let roomActionLeave = ImageAsset(name: "room_action_leave")
internal static let roomActionNotification = ImageAsset(name: "room_action_notification")
internal static let roomActionNotificationMuted = ImageAsset(name: "room_action_notification_muted")
internal static let roomActionPriorityHigh = ImageAsset(name: "room_action_priority_high")
internal static let roomActionPriorityLow = ImageAsset(name: "room_action_priority_low")
internal static let allChatEditLayout = ImageAsset(name: "all_chat_edit_layout")
internal static let allChatsEditIcon = ImageAsset(name: "all_chats_edit_icon")
internal static let allChatsEmptyListPlaceholderIcon = ImageAsset(name: "all_chats_empty_list_placeholder_icon")
internal static let allChatsEmptyScreenArtwork = ImageAsset(name: "all_chats_empty_screen_artwork")
Expand Down
26 changes: 25 additions & 1 deletion Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public class VectorL10n: NSObject {
public static var allChatsEmptySpaceInformation: String {
return VectorL10n.tr("Vector", "all_chats_empty_space_information")
}
/// This is where you're unread messages will show up, when you have some.
/// This is where your unread messages will show up, when you have some.
public static var allChatsEmptyUnreadsPlaceholderMessage: String {
return VectorL10n.tr("Vector", "all_chats_empty_unreads_placeholder_message")
}
Expand Down Expand Up @@ -8471,6 +8471,10 @@ public class VectorL10n: NSObject {
public static func userSessionItemDetails(_ p1: String, _ p2: String) -> String {
return VectorL10n.tr("Vector", "user_session_item_details", p1, p2)
}
/// Learn more
public static var userSessionLearnMore: String {
return VectorL10n.tr("Vector", "user_session_learn_more")
}
/// %@: %@
public static func userSessionName(_ p1: String, _ p2: String) -> String {
return VectorL10n.tr("Vector", "user_session_name", p1, p2)
Expand All @@ -8479,6 +8483,10 @@ public class VectorL10n: NSObject {
public static var userSessionUnverified: String {
return VectorL10n.tr("Vector", "user_session_unverified")
}
/// Verify your current session for enhanced secure messaging.
public static var userSessionUnverifiedAdditionalInfo: String {
return VectorL10n.tr("Vector", "user_session_unverified_additional_info")
}
/// Unverified
public static var userSessionUnverifiedShort: String {
return VectorL10n.tr("Vector", "user_session_unverified_short")
Expand All @@ -8487,10 +8495,26 @@ public class VectorL10n: NSObject {
public static var userSessionVerified: String {
return VectorL10n.tr("Vector", "user_session_verified")
}
/// Your current session is ready for secure messaging.
public static var userSessionVerifiedAdditionalInfo: String {
return VectorL10n.tr("Vector", "user_session_verified_additional_info")
}
/// Verified
public static var userSessionVerifiedShort: String {
return VectorL10n.tr("Vector", "user_session_verified_short")
}
/// Verify session
public static var userSessionVerifyAction: String {
return VectorL10n.tr("Vector", "user_session_verify_action")
}
/// View details
public static var userSessionViewDetails: String {
return VectorL10n.tr("Vector", "user_session_view_details")
}
/// CURRENT SESSION
public static var userSessionsOverviewCurrentSessionSectionTitle: String {
return VectorL10n.tr("Vector", "user_sessions_overview_current_session_section_title")
}
/// For best security, verify your sessions and sign out from any session that you don’t recognize or use anymore.
public static var userSessionsOverviewOtherSessionsSectionInfo: String {
return VectorL10n.tr("Vector", "user_sessions_overview_other_sessions_section_info")
Expand Down
4 changes: 4 additions & 0 deletions Riot/Modules/Analytics/SentryMonitoringClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ struct SentryMonitoringClient {
options.sampleRate = 0.1
options.tracesSampleRate = 0.1

// Disable unnecessary network tracking
options.enableNetworkBreadcrumbs = false
options.enableNetworkTracking = false

options.beforeSend = { event in
MXLog.debug("[SentryMonitoringClient] Issue detected: \(event)")
return event
Expand Down
13 changes: 11 additions & 2 deletions Riot/Modules/Application/LegacyAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,9 @@ - (void)logoutWithConfirmation:(BOOL)askConfirmation completion:(void (^)(BOOL i
- (void)logoutSendingRequestServer:(BOOL)sendLogoutServerRequest
completion:(void (^)(BOOL isLoggedOut))completion
{
MXSession *mainSession = self.mxSessions.firstObject;
[mainSession close];

[self.pushNotificationService deregisterRemoteNotifications];

// Clear cache
Expand Down Expand Up @@ -4360,8 +4363,14 @@ - (void)setPinCoordinatorBridgePresenterDelegateDidCompleteWithReset:(SetPinCoor
{
if (dueToTooManyErrors)
{
[self showAlertWithTitle:nil message:[VectorL10n pinProtectionKickUserAlertMessage]];
[self logoutWithConfirmation:NO completion:nil];
[coordinatorBridgePresenter dismissWithMainAppWindow:self.window];
self.setPinCoordinatorBridgePresenter = nil;
[self logoutWithConfirmation:NO completion:^(BOOL isLoggedOut) {
if (isLoggedOut)
{
[self showAlertWithTitle:nil message:[VectorL10n pinProtectionKickUserAlertMessage]];
}
}];
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,14 @@ public class RecentsListService: NSObject, RecentsListServiceProtocol {
guard let session = session else {
return
}
guard session.state != .closed else {
MXLog.debug("[RecentsListService] createFetchers cancelled on closed session")
return
}
guard session.roomListDataManager != nil else {
MXLog.debug("[RecentsListService] createFetchers cancelled on race condition (session closing in progress)")
return
}
guard session.isEventStreamInitialised else {
return
}
Expand Down
4 changes: 1 addition & 3 deletions Riot/Modules/DeepLink/MXRoomAliasResolution+Deeplink.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ import MatrixSDK
return nil
}

return MXTools.encodeURIComponent(
fragment(for: roomId)
)
return fragment(for: roomId)
}

private func fragment(for roomId: String) -> String {
Expand Down
7 changes: 4 additions & 3 deletions Riot/Modules/Home/AllChats/AllChatsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
var subMenuActions: [UIAction] = []
if BuildSettings.sideMenuShowInviteFriends {
subMenuActions.append(UIAction(title: VectorL10n.sideMenuActionInviteFriends, image: UIImage(systemName: "square.and.arrow.up.fill")) { [weak self] action in
self?.showInviteFriends(from: nil)
guard let self = self else { return }
self.showInviteFriends(from: self.avatarMenuButton)
})
}

Expand Down Expand Up @@ -585,7 +586,7 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
signOutAlertPresenter.present(for: keyBackup.state,
areThereKeysToBackup: keyBackup.hasKeysToBackup,
from: self.allChatsViewController,
sourceView: nil,
sourceView: avatarMenuButton,
animated: true)
}

Expand Down Expand Up @@ -767,7 +768,7 @@ extension AllChatsCoordinator: AllChatsViewControllerDelegate {
self.showRoom(withNavigationParameters: roomNavigationParameters, completion: completion)
}

func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: @escaping () -> Void) {
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: (() -> Void)?) {
self.showRoomPreview(withNavigationParameters: roomPreviewNavigationParameters, completion: completion)
}

Expand Down
34 changes: 31 additions & 3 deletions Riot/Modules/Home/AllChats/AllChatsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Reusable
protocol AllChatsViewControllerDelegate: AnyObject {
func allChatsViewControllerDidCompleteAuthentication(_ allChatsViewController: AllChatsViewController)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomWithParameters roomNavigationParameters: RoomNavigationParameters, completion: @escaping () -> Void)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: @escaping () -> Void)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomPreviewWithParameters roomPreviewNavigationParameters: RoomPreviewNavigationParameters, completion: (() -> Void)?)
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectContact contact: MXKContact, with presentationParameters: ScreenPresentationParameters)
}

Expand Down Expand Up @@ -208,7 +208,27 @@ class AllChatsViewController: HomeViewController {

override func addMatrixSession(_ mxSession: MXSession!) {
super.addMatrixSession(mxSession)
initDataSource()

if let dataSource = dataSource, !dataSource.mxSessions.contains(where: { $0 as? MXSession == mxSession }) {
dataSource.addMatrixSession(mxSession)
// Setting the delegate is required to send a RecentsViewControllerDataReadyNotification.
// Without this, when clearing the cache we end up with an infinite green spinner.
(dataSource as? RecentsDataSource)?.setDelegate(self, andRecentsDataSourceMode: recentsDataSourceMode)
} else {
initDataSource()
}
}

override func removeMatrixSession(_ mxSession: MXSession!) {
super.removeMatrixSession(mxSession)

guard let dataSource = dataSource else { return }
dataSource.removeMatrixSession(mxSession)

if dataSource.mxSessions.isEmpty {
// The user logged out -> we need to reset the data source
displayList(nil)
}
}

private func initDataSource() {
Expand Down Expand Up @@ -336,12 +356,20 @@ class AllChatsViewController: HomeViewController {
}

override func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
guard scrollView == recentsTableView else {
return
}

initialScrollPosition = scrollPosition(of: scrollView)
}

override func scrollViewDidScroll(_ scrollView: UIScrollView) {
super.scrollViewDidScroll(scrollView)

guard scrollView == recentsTableView else {
return
}

let scrollPosition = scrollPosition(of: scrollView)

if !self.recentsTableView.isDragging && scrollPosition == 0 && self.navigationController?.isToolbarHidden == true {
Expand Down Expand Up @@ -854,7 +882,7 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol {
/// - Parameters:
/// - parameters: the presentation parameters that contains room preview information plus display information.
/// - completion: the block to execute at the end of the operation.
func selectRoomPreview(with parameters: RoomPreviewNavigationParameters, completion: @escaping () -> Void) {
func selectRoomPreview(with parameters: RoomPreviewNavigationParameters, completion: (() -> Void)?) {
releaseSelectedItem()

let roomPreviewData = parameters.previewData
Expand Down
12 changes: 11 additions & 1 deletion Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,17 @@ - (NSString*)buildHTMLStringForEvent:(MXEvent*)event inReplyToEvent:(MXEvent*)re
}
else
{
MXJSONModelSetString(repliedEventContent, repliedEvent.content[@"formatted_body"]);
MXReplyEventParser *parser = [[MXReplyEventParser alloc] init];
MXReplyEventParts *parts = [parser parse:repliedEvent];
MXJSONModelSetString(repliedEventContent, parts.formattedBodyParts.replyText)
if (!repliedEventContent)
{
MXJSONModelSetString(repliedEventContent, parts.bodyParts.replyText)
}
if (!repliedEventContent)
{
MXJSONModelSetString(repliedEventContent, repliedEvent.content[@"formatted_body"]);
}
if (!repliedEventContent)
{
MXJSONModelSetString(repliedEventContent, repliedEvent.content[kMXMessageBodyKey]);
Expand Down
1 change: 1 addition & 0 deletions Riot/Modules/Room/RoomViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ extern NSNotificationName const RoomGroupCallTileTappedNotification;
// The preview header
@property (weak, nonatomic, nullable) IBOutlet UIView *previewHeaderContainer;
@property (weak, nonatomic, nullable) IBOutlet NSLayoutConstraint *previewHeaderContainerHeightConstraint;
@property (weak, nonatomic, nullable) IBOutlet NSLayoutConstraint *userSuggestionContainerHeightConstraint;

// The jump to last unread banner
@property (weak, nonatomic, nullable) IBOutlet UIView *jumpToLastUnreadBannerContainer;
Expand Down
18 changes: 14 additions & 4 deletions Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1544,10 +1544,6 @@ - (void)createDiscussionWithUser:(MXUser*)user completion:(void (^)(BOOL success
*/
- (void)createDiscussionIfNeeded:(void (^)(BOOL readyToSend))onComplete
{
// Disable the input tool bar during this operation. This prevents us from creating several discussions, or
// trying to send several invites.
self.inputToolbarView.userInteractionEnabled = false;

void(^completion)(BOOL) = ^(BOOL readyToSend) {
self.inputToolbarView.userInteractionEnabled = true;
if (onComplete) {
Expand All @@ -1557,6 +1553,10 @@ - (void)createDiscussionIfNeeded:(void (^)(BOOL readyToSend))onComplete

if (self.directChatTargetUser)
{
// Disable the input tool bar during this operation. This prevents us from creating several discussions, or
// trying to send several invites.
self.inputToolbarView.userInteractionEnabled = false;

[self createDiscussionWithUser:self.directChatTargetUser completion:completion];
}
else
Expand Down Expand Up @@ -7757,6 +7757,16 @@ - (void)userSuggestionCoordinatorBridge:(UserSuggestionCoordinatorBridge *)coord
[self mention:member];
}

- (void)userSuggestionCoordinatorBridge:(UserSuggestionCoordinatorBridge *)coordinator didUpdateViewHeight:(CGFloat)height
{
if (self.userSuggestionContainerHeightConstraint.constant != height)
{
self.userSuggestionContainerHeightConstraint.constant = height;

[self.view layoutIfNeeded];
}
}

#pragma mark - ThreadsCoordinatorBridgePresenterDelegate

- (void)threadsCoordinatorBridgePresenterDelegateDidComplete:(ThreadsCoordinatorBridgePresenter *)coordinatorBridgePresenter
Expand Down
Loading

0 comments on commit fbf78b4

Please sign in to comment.