Merge branch 'develop' into aringenbach/5745_mandatory_secure_backup

This commit is contained in:
Arnaud Ringenbach
2022-03-21 15:28:23 +01:00
109 changed files with 1413 additions and 230 deletions
@@ -213,9 +213,11 @@ final class AppCoordinator: NSObject, AppCoordinatorType {
case .homeSpace:
MXLog.verbose("Switch to home space")
self.navigateToSpace(with: nil)
Analytics.shared.activeSpace = nil
case .space(let spaceId):
MXLog.verbose("Switch to space with id: \(spaceId)")
self.navigateToSpace(with: spaceId)
Analytics.shared.activeSpace = userSessionsService.mainUserSession?.matrixSession.spaceService.getSpace(withId: spaceId)
}
}
@@ -1109,6 +1109,19 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
shouldNavigateToRoomWithId:(NSString *)roomId
threadId:(NSString *)threadId
{
if (roomId)
{
MXRoom *room = [self.mxSessions.firstObject roomWithRoomId:roomId];
if (room.summary.membership != MXMembershipJoin)
{
Analytics.shared.joinedRoomTrigger = AnalyticsJoinedRoomTriggerNotification;
}
else
{
Analytics.shared.viewRoomTrigger = AnalyticsViewRoomTriggerNotification;
}
}
_lastNavigatedRoomIdFromPush = roomId;
[self navigateToRoomById:roomId threadId:threadId];
}
@@ -2955,6 +2968,11 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
{
MXRoom *room = [mxSession roomWithRoomId:roomId];
if (room && room.summary.membership == MXMembershipJoin)
{
[Analytics.shared trackViewRoom:room];
}
// Indicates that spaces are not supported
if (room.summary.roomType == MXRoomTypeSpace)
{
@@ -3186,6 +3204,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
[mxSession createRoomWithParameters:roomCreationParameters success:^(MXRoom *room) {
// Open created room
Analytics.shared.viewRoomTrigger = AnalyticsViewRoomTriggerCreated;
[self showRoom:room.roomId andEventId:nil withMatrixSession:mxSession];
if (completion)
@@ -3220,6 +3239,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
if (directRoom)
{
// open it
Analytics.shared.viewRoomTrigger = AnalyticsViewRoomTriggerCreated;
[self showRoom:directRoom.roomId andEventId:nil withMatrixSession:mxSession];
if (completion)