From da7148f77adcaa9217a8097c8e9bdb1ad8314e08 Mon Sep 17 00:00:00 2001 From: opusforlife2 <53176348+opusforlife2@users.noreply.github.com> Date: Mon, 11 Oct 2021 19:15:04 +0000 Subject: [PATCH 01/34] Edited heading + subheadings to avoid redundancy Also made the subheadings one size smaller (4 #'s instead of 3) --- .github/ISSUE_TEMPLATE/bug.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index d50712529..d95e16935 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -23,12 +23,12 @@ body: - type: textarea id: result attributes: - label: What happened? + label: Intended result and actual result placeholder: Tell us what went wrong value: | - ### What did you expect? + #### What did you expect? - ### What happened? + #### What happened instead? validations: required: true - type: input From d9962bb19c14b1158df6ba6de2f4cd275a8fc8e8 Mon Sep 17 00:00:00 2001 From: opusforlife2 <53176348+opusforlife2@users.noreply.github.com> Date: Mon, 11 Oct 2021 19:19:46 +0000 Subject: [PATCH 02/34] Add changelog file for PR #4984 --- changelog.d/4984.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/4984.misc diff --git a/changelog.d/4984.misc b/changelog.d/4984.misc new file mode 100644 index 000000000..97b50d8c5 --- /dev/null +++ b/changelog.d/4984.misc @@ -0,0 +1 @@ +Fix redundancy in heading in the bug report issue form From 1415155eb6f4d8b506f5fc736f4095bad581f6c4 Mon Sep 17 00:00:00 2001 From: Doug Date: Mon, 1 Nov 2021 15:05:02 +0000 Subject: [PATCH 03/34] Present alerts before assigning to currentAlert. --- Riot/Modules/Room/RoomViewController.m | 355 +++++++++++++------------ 1 file changed, 182 insertions(+), 173 deletions(-) diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 6d989d669..b127e98fe 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -2062,20 +2062,22 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [VectorL10n widgetStickerPickerNoStickerpacksAlert], [VectorL10n widgetStickerPickerNoStickerpacksAlertAddNow]]; - currentAlert = [UIAlertController alertControllerWithTitle:nil message:alertMessage preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *installPrompt = [UIAlertController alertControllerWithTitle:nil + message:alertMessage + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no] - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) + [installPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no] + style:UIAlertActionStyleCancel + handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) + [installPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; @@ -2090,8 +2092,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [self presentViewController:modularVC animated:NO completion:nil]; }]]; - [currentAlert mxk_setAccessibilityIdentifier:@"RoomVCStickerPickerAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [installPrompt mxk_setAccessibilityIdentifier:@"RoomVCStickerPickerAlert"]; + [self presentViewController:installPrompt animated:YES completion:nil]; + currentAlert = installPrompt; } } @@ -3145,14 +3148,14 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; } __weak __typeof(self) weakSelf = self; - currentAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + UIAlertController *actionsMenu = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; // Add actions for a failed event if (selectedEvent.sentState == MXEventSentStateFailed) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n retry] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n retry] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3166,9 +3169,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionDelete] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionDelete] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3203,9 +3206,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; selectedEvent.sentState == MXEventSentStateEncrypting || selectedEvent.sentState == MXEventSentStateSending) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionCancelSend] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionCancelSend] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3223,9 +3226,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; } - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { self.shareManager = [[ShareManager alloc] initWithShareItemProvider:[[SimpleShareItemProvider alloc] initWithTextMessage:selectedComponent.textMessage] type:ShareManagerTypeForward]; @@ -3242,9 +3245,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (!isJitsiCallEvent) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionQuote] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionQuote] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3264,9 +3267,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (!isJitsiCallEvent && BuildSettings.messageDetailsAllowShare) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionShare] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionShare] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3298,9 +3301,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; attachment.type == MXKAttachmentTypeVideo || attachment.type == MXKAttachmentTypeVoiceMessage) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { self.shareManager = [[ShareManager alloc] initWithShareItemProvider:[[SimpleShareItemProvider alloc] initWithAttachment:attachment] type:ShareManagerTypeForward]; @@ -3320,9 +3323,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; { if (attachment.type == MXKAttachmentTypeImage || attachment.type == MXKAttachmentTypeVideo) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionSave] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionSave] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3365,9 +3368,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; NSString *uploadId = roomBubbleTableViewCell.bubbleData.attachment.contentURL; if ([MXMediaManager existingUploaderWithId:uploadId]) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionCancelSend] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionCancelSend] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { // Get again the loader MXMediaLoader *loader = [MXMediaManager existingUploaderWithId:uploadId]; @@ -3403,9 +3406,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; { if (BuildSettings.messageDetailsAllowShare) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionShare] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionShare] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3453,9 +3456,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; NSString *downloadId = roomBubbleTableViewCell.bubbleData.attachment.downloadId; if ([MXMediaManager existingDownloaderWithIdentifier:downloadId]) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionCancelDownload] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionCancelDownload] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3481,9 +3484,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; // because it breaks everything if (selectedEvent.eventType != MXEventTypeRoomEncryption) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionRedact] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionRedact] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3515,9 +3518,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (BuildSettings.messageDetailsAllowPermalink) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionPermalink] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionPermalink] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3544,9 +3547,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; // Add reaction history if event contains reactions if (roomBubbleTableViewCell.bubbleData.reactions[selectedEvent.eventId].aggregatedReactionsWithNonZeroCount) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionReactionHistory] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionReactionHistory] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { [self cancelEventSelection]; @@ -3557,9 +3560,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (BuildSettings.messageDetailsAllowViewSource) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewSource] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewSource] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3577,9 +3580,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; // Add "View Decrypted Source" for e2ee event we can decrypt if (selectedEvent.isEncrypted && selectedEvent.clearEvent) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewDecryptedSource] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewDecryptedSource] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3597,9 +3600,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (![selectedEvent.sender isEqualToString:self.mainSession.myUser.userId] && RiotSettings.shared.roomContextualMenuShowReportContentOption) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionReport] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionReport] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3608,15 +3611,15 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [self cancelEventSelection]; // Prompt user to enter a description of the problem content. - self->currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomEventActionReportPromptReason] message:nil preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *reportReasonAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomEventActionReportPromptReason] message:nil preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) { + [reportReasonAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) { textField.secureTextEntry = NO; textField.placeholder = nil; textField.keyboardType = UIKeyboardTypeDefault; }]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [reportReasonAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3632,9 +3635,11 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [self stopActivityIndicator]; // Prompt user to ignore content from this user - self->currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomEventActionReportPromptIgnoreUser] message:nil preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *ignoreUserAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomEventActionReportPromptIgnoreUser] + message:nil + preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [ignoreUserAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3663,7 +3668,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [ignoreUserAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3673,7 +3678,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [self presentViewController:ignoreUserAlert animated:YES completion:nil]; + self->currentAlert = ignoreUserAlert; } failure:^(NSError *error) { @@ -3689,7 +3695,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { + [reportReasonAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3699,7 +3705,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [self presentViewController:reportReasonAlert animated:YES completion:nil]; + self->currentAlert = reportReasonAlert; } }]]; @@ -3707,9 +3714,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (!isJitsiCallEvent && self.roomDataSource.room.summary.isEncrypted) { - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewEncryption] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewEncryption] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3724,9 +3731,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; } } - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) { + [actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] + style:UIAlertActionStyleCancel + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3737,20 +3744,17 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; // Do not display empty action sheet - if (currentAlert.actions.count > 1) + if (actionsMenu.actions.count > 1) { NSInteger bubbleComponentIndex = [roomBubbleTableViewCell.bubbleData bubbleComponentIndexForEventId:selectedEvent.eventId]; CGRect sourceRect = [roomBubbleTableViewCell componentFrameInContentViewForIndex:bubbleComponentIndex]; - [currentAlert mxk_setAccessibilityIdentifier:@"RoomVCEventMenuAlert"]; - [currentAlert popoverPresentationController].sourceView = roomBubbleTableViewCell; - [currentAlert popoverPresentationController].sourceRect = sourceRect; - [self presentViewController:currentAlert animated:animated completion:nil]; - } - else - { - currentAlert = nil; + [actionsMenu mxk_setAccessibilityIdentifier:@"RoomVCEventMenuAlert"]; + [actionsMenu popoverPresentationController].sourceView = roomBubbleTableViewCell; + [actionsMenu popoverPresentationController].sourceRect = sourceRect; + [self presentViewController:actionsMenu animated:animated completion:nil]; + currentAlert = actionsMenu; } } @@ -4123,14 +4127,14 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; - (void)showVoiceCallActionSheet { // Ask the user the kind of the call: voice or dialpad? - currentAlert = [UIAlertController alertControllerWithTitle:nil - message:nil - preferredStyle:UIAlertControllerStyleActionSheet]; + UIAlertController *callActionSheet = [UIAlertController alertControllerWithTitle:nil + message:nil + preferredStyle:UIAlertControllerStyleActionSheet]; __weak typeof(self) weakSelf = self; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomPlaceVoiceCall] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [callActionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomPlaceVoiceCall] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -4142,9 +4146,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomOpenDialpad] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [callActionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomOpenDialpad] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -4156,9 +4160,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) { + [callActionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] + style:UIAlertActionStyleCancel + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -4168,9 +4172,10 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert popoverPresentationController].barButtonItem = self.navigationItem.rightBarButtonItems.firstObject; - [currentAlert popoverPresentationController].permittedArrowDirections = UIPopoverArrowDirectionUp; - [self presentViewController:currentAlert animated:YES completion:nil]; + [callActionSheet popoverPresentationController].barButtonItem = self.navigationItem.rightBarButtonItems.firstObject; + [callActionSheet popoverPresentationController].permittedArrowDirections = UIPopoverArrowDirectionUp; + [self presentViewController:callActionSheet animated:YES completion:nil]; + currentAlert = callActionSheet; } - (void)placeCallWithVideo2:(BOOL)video @@ -4222,20 +4227,21 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; MXWeakify(self); [currentAlert dismissViewControllerAnimated:NO completion:nil]; - currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomNoPrivilegesToCreateGroupCall] - message:nil - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *unprivilegedAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomNoPrivilegesToCreateGroupCall] + message:nil + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) + [unprivilegedAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; }]]; - [currentAlert mxk_setAccessibilityIdentifier:@"RoomVCCallAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [unprivilegedAlert mxk_setAccessibilityIdentifier:@"RoomVCCallAlert"]; + [self presentViewController:unprivilegedAlert animated:YES completion:nil]; + currentAlert = unprivilegedAlert; } } } @@ -5163,6 +5169,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [VectorL10n roomUnsentMessagesUnknownDevicesNotification] : [VectorL10n roomUnsentMessagesNotification]; + MXWeakify(self); RoomActivitiesView *roomActivitiesView = (RoomActivitiesView*) self.activitiesView; self.activitiesViewExpanded = YES; [roomActivitiesView displayUnsentMessagesNotification:notification withResendLink:^{ @@ -5174,57 +5181,53 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [self cancelAllUnsentMessages]; } andIconTapGesture:^{ + MXStrongifyAndReturnIfNil(self); - if (currentAlert) + if (self->currentAlert) { - [currentAlert dismissViewControllerAnimated:NO completion:nil]; + [self->currentAlert dismissViewControllerAnimated:NO completion:nil]; } - __weak __typeof(self) weakSelf = self; - currentAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + MXWeakify(self); + UIAlertController *resendAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomResendUnsentMessages] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [resendAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomResendUnsentMessages] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { - if (weakSelf) - { - typeof(self) self = weakSelf; - [self resendAllUnsentMessages]; - self->currentAlert = nil; - } + MXStrongifyAndReturnIfNil(self); + + [self resendAllUnsentMessages]; + self->currentAlert = nil; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomDeleteUnsentMessages] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [resendAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomDeleteUnsentMessages] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { - if (weakSelf) - { - typeof(self) self = weakSelf; - [self cancelAllUnsentMessages]; - self->currentAlert = nil; - } + MXStrongifyAndReturnIfNil(self); + + [self cancelAllUnsentMessages]; + self->currentAlert = nil; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) { + [resendAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] + style:UIAlertActionStyleCancel + handler:^(UIAlertAction * action) { - if (weakSelf) - { - typeof(self) self = weakSelf; - self->currentAlert = nil; - } + MXStrongifyAndReturnIfNil(self); + + self->currentAlert = nil; }]]; - [currentAlert mxk_setAccessibilityIdentifier:@"RoomVCUnsentMessagesMenuAlert"]; - [currentAlert popoverPresentationController].sourceView = roomActivitiesView; - [currentAlert popoverPresentationController].sourceRect = roomActivitiesView.bounds; - [self presentViewController:currentAlert animated:YES completion:nil]; + [resendAlert mxk_setAccessibilityIdentifier:@"RoomVCUnsentMessagesMenuAlert"]; + [resendAlert popoverPresentationController].sourceView = roomActivitiesView; + [resendAlert popoverPresentationController].sourceRect = roomActivitiesView.bounds; + [self presentViewController:resendAlert animated:YES completion:nil]; + self->currentAlert = resendAlert; }]; } @@ -5264,13 +5267,13 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; } } - currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n unknownDevicesAlertTitle] - message:[VectorL10n unknownDevicesAlert] - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *unknownDevicesAlert = [UIAlertController alertControllerWithTitle:[VectorL10n unknownDevicesAlertTitle] + message:[VectorL10n unknownDevicesAlert] + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n unknownDevicesVerify] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [unknownDevicesAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n unknownDevicesVerify] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -5282,9 +5285,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n unknownDevicesSendAnyway] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [unknownDevicesAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n unknownDevicesSendAnyway] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -5305,8 +5308,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert mxk_setAccessibilityIdentifier:@"RoomVCUnknownDevicesAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [unknownDevicesAlert mxk_setAccessibilityIdentifier:@"RoomVCUnknownDevicesAlert"]; + [self presentViewController:unknownDevicesAlert animated:YES completion:nil]; + currentAlert = unknownDevicesAlert; } } @@ -5368,15 +5372,17 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; - (void)cancelAllUnsentMessages { - currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomUnsentMessagesCancelTitle] message:[VectorL10n roomUnsentMessagesCancelMessage] preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *cancelAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomUnsentMessagesCancelTitle] + message:[VectorL10n roomUnsentMessagesCancelMessage] + preferredStyle:UIAlertControllerStyleAlert]; MXWeakify(self); - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { + [cancelAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n delete] style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) { + [cancelAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n delete] style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); // Remove unsent event ids for (NSUInteger index = 0; index < self.roomDataSource.room.outgoingMessages.count;) @@ -5393,9 +5399,11 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; } [self refreshActivitiesViewDisplay]; + self->currentAlert = nil; }]]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [self presentViewController:cancelAlert animated:YES completion:nil]; + currentAlert = cancelAlert; } # pragma mark - Encryption Information view @@ -5624,11 +5632,11 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; // Invite ? NSString *promptMsg = [VectorL10n roomParticipantsInvitePromptMsg:contact.displayName]; - currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomParticipantsInvitePromptTitle] - message:promptMsg - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *invitePrompt = [UIAlertController alertControllerWithTitle:[VectorL10n roomParticipantsInvitePromptTitle] + message:promptMsg + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] + [invitePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { @@ -5640,7 +5648,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n invite] + [invitePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n invite] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { @@ -5735,8 +5743,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; }]]; - [currentAlert mxk_setAccessibilityIdentifier:@"RoomVCInviteAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [invitePrompt mxk_setAccessibilityIdentifier:@"RoomVCInviteAlert"]; + [self presentViewController:invitePrompt animated:YES completion:nil]; + currentAlert = invitePrompt; } #pragma mark - Re-request encryption keys @@ -5780,8 +5789,6 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; alert = [UIAlertController alertControllerWithTitle:VectorL10n.rerequestKeysAlertTitle message:[VectorL10n e2eRoomKeyRequestMessage:AppInfo.current.displayName] preferredStyle:UIAlertControllerStyleAlert]; - currentAlert = alert; - [alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault @@ -5795,7 +5802,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; self->currentAlert = nil; }]]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [self presentViewController:alert animated:YES completion:nil]; + currentAlert = alert; } - (void)presentReviewUnverifiedSessionsAlert @@ -6069,18 +6077,19 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [self hideContextualMenuAnimated:YES cancelEventSelection:YES completion:^{ MXStrongifyAndReturnIfNil(self); - self->currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomEventActionDeleteConfirmationTitle] - message:[VectorL10n roomEventActionDeleteConfirmationMessage] - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *deleteConfirmation = [UIAlertController alertControllerWithTitle:[VectorL10n roomEventActionDeleteConfirmationTitle] + message:[VectorL10n roomEventActionDeleteConfirmationMessage] + preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [deleteConfirmation addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { }]]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n delete] style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) { + [deleteConfirmation addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n delete] style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) { [self.roomDataSource removeEventWithEventId:event.eventId]; }]]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [self presentViewController:deleteConfirmation animated:YES completion:nil]; + self->currentAlert = deleteConfirmation; }]; }; From f2cd6738965095e98f213ccb3008ad8795bc5f02 Mon Sep 17 00:00:00 2001 From: Doug Date: Mon, 1 Nov 2021 17:26:51 +0000 Subject: [PATCH 04/34] Keep strong refs to weak views before display. --- .../Common/Recents/RecentsViewController.m | 76 ++++---- .../Modules/Settings/SettingsViewController.m | 177 ++++++++++-------- changelog.d/5071.bugfix | 1 + 3 files changed, 141 insertions(+), 113 deletions(-) create mode 100644 changelog.d/5071.bugfix diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index 585f79c5f..401a535e0 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -539,11 +539,13 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro [self->currentAlert dismissViewControllerAnimated:NO completion:nil]; - self->currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n roomErrorJoinFailedTitle] message:msg preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n roomErrorJoinFailedTitle] + message:msg + preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; @@ -553,7 +555,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro } }]]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [self presentViewController:errorAlert animated:YES completion:nil]; + currentAlert = errorAlert; } #pragma mark - Sticky Headers @@ -1202,13 +1205,13 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro } // confirm leave - currentAlert = [UIAlertController alertControllerWithTitle:title - message:message - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *leavePrompt = [UIAlertController alertControllerWithTitle:title + message:message + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) { + [leavePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] + style:UIAlertActionStyleCancel + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -1218,8 +1221,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n leave] - style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [leavePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n leave] + style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { if (weakSelf) { @@ -1280,8 +1283,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro }]]; - [currentAlert mxk_setAccessibilityIdentifier:@"LeaveEditedRoomAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [leavePrompt mxk_setAccessibilityIdentifier:@"LeaveEditedRoomAlert"]; + [self presentViewController:leavePrompt animated:YES completion:nil]; + currentAlert = leavePrompt; } } @@ -1836,11 +1840,11 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro [currentAlert dismissViewControllerAnimated:NO completion:nil]; - currentAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + UIAlertController *actionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsStartChatWith] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsStartChatWith] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -1852,9 +1856,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsCreateEmptyRoom] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsCreateEmptyRoom] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -1866,9 +1870,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsJoinRoom] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsJoinRoom] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -1882,10 +1886,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro if (self.mainSession.callManager.supportsPSTN) { - [currentAlert addAction:[UIAlertAction - actionWithTitle:[VectorL10n roomOpenDialpad] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomOpenDialpad] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -1898,9 +1901,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro }]]; } - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] - style:UIAlertActionStyleCancel - handler:^(UIAlertAction * action) { + [actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] + style:UIAlertActionStyleCancel + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -1910,11 +1913,12 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro }]]; - [currentAlert popoverPresentationController].sourceView = plusButtonImageView; - [currentAlert popoverPresentationController].sourceRect = plusButtonImageView.bounds; + [actionSheet popoverPresentationController].sourceView = plusButtonImageView; + [actionSheet popoverPresentationController].sourceRect = plusButtonImageView.bounds; - [currentAlert mxk_setAccessibilityIdentifier:@"RecentsVCCreateRoomAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [actionSheet mxk_setAccessibilityIdentifier:@"RecentsVCCreateRoomAlert"]; + [self presentViewController:actionSheet animated:YES completion:nil]; + currentAlert = actionSheet; } - (void)openDialpad diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 7ecfcb533..cee976ad2 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -991,9 +991,11 @@ TableViewSectionsDelegate> { MXWeakify(self); [currentAlert dismissViewControllerAnimated:NO completion:nil]; - currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountEmailValidationTitle] message:message preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *validationAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountEmailValidationTitle] + message:message + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; [self stopActivityIndicator]; @@ -1002,14 +1004,15 @@ TableViewSectionsDelegate> self.newEmailEditingEnabled = NO; }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n continue] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n continue] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); [self tryFinaliseAddEmailSession:threePidAddSession withAuthenticationParameters:authenticationParameters threePidAddManager:threePidAddManager]; }]]; - [currentAlert mxk_setAccessibilityIdentifier:@"SettingsVCEmailValidationAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [validationAlert mxk_setAccessibilityIdentifier:@"SettingsVCEmailValidationAlert"]; + [self presentViewController:validationAlert animated:YES completion:nil]; + currentAlert = validationAlert; } - (void)tryFinaliseAddEmailSession:(MX3PidAddSession*)threePidAddSession withAuthenticationParameters:(NSDictionary*)authParams threePidAddManager:(MX3PidAddManager*)threePidAddManager @@ -1049,11 +1052,13 @@ TableViewSectionsDelegate> MXLogDebug(@"[SettingsViewController] tryFinaliseAddEmailSession: Wrong credentials"); // Ask password again - self->currentAlert = [UIAlertController alertControllerWithTitle:nil - message:[VectorL10n settingsAdd3pidInvalidPasswordMessage] - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *passwordPrompt = [UIAlertController alertControllerWithTitle:nil + message:[VectorL10n settingsAdd3pidInvalidPasswordMessage] + preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n retry] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + MXWeakify(self); + [passwordPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n retry] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; [self showAuthenticationIfNeededForAdding:kMX3PIDMediumEmail withSession:self.mainSession completion:^(NSDictionary *authParams) { @@ -1061,7 +1066,8 @@ TableViewSectionsDelegate> }]; }]]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [self presentViewController:passwordPrompt animated:YES completion:nil]; + self->currentAlert = passwordPrompt; return; } @@ -1102,9 +1108,11 @@ TableViewSectionsDelegate> MXWeakify(self); [currentAlert dismissViewControllerAnimated:NO completion:nil]; - currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountMsisdnValidationTitle] message:message preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *validationAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountMsisdnValidationTitle] + message:message + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; @@ -1115,13 +1123,13 @@ TableViewSectionsDelegate> self.newPhoneEditingEnabled = NO; }]]; - [currentAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) { + [validationAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) { textField.secureTextEntry = NO; textField.placeholder = nil; textField.keyboardType = UIKeyboardTypeDecimalPad; }]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n submit] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + [validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n submit] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); @@ -1140,8 +1148,9 @@ TableViewSectionsDelegate> } }]]; - [currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCMsisdnValidationAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [validationAlert mxk_setAccessibilityIdentifier: @"SettingsVCMsisdnValidationAlert"]; + [self presentViewController:validationAlert animated:YES completion:nil]; + currentAlert = validationAlert; } - (void)finaliseAddPhoneNumberSession:(MX3PidAddSession*)threePidAddSession withToken:(NSString*)token andAuthenticationParameters:(NSDictionary*)authParams message:(NSString*)message threePidAddManager:(MX3PidAddManager*)threePidAddManager @@ -1180,11 +1189,13 @@ TableViewSectionsDelegate> MXLogDebug(@"[SettingsViewController] finaliseAddPhoneNumberSession: Wrong authentication credentials"); // Ask password again - self->currentAlert = [UIAlertController alertControllerWithTitle:nil - message:[VectorL10n settingsAdd3pidInvalidPasswordMessage] - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *passwordPrompt = [UIAlertController alertControllerWithTitle:nil + message:[VectorL10n settingsAdd3pidInvalidPasswordMessage] + preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n retry] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + MXWeakify(self); + [passwordPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n retry] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; [self showAuthenticationIfNeededForAdding:kMX3PIDMediumMSISDN withSession:self.mainSession completion:^(NSDictionary *authParams) { @@ -1192,7 +1203,8 @@ TableViewSectionsDelegate> }]; }]]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [self presentViewController:passwordPrompt animated:YES completion:nil]; + self->currentAlert = passwordPrompt; return; } @@ -1232,17 +1244,20 @@ TableViewSectionsDelegate> } - self->currentAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + MXWeakify(self); + [errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; // Ask again the sms token [self showValidationMsisdnDialogWithMessage:message for3PidAddSession:threePidAddSession threePidAddManager:threePidAddManager authenticationParameters:authParams]; }]]; - [self->currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCErrorAlert"]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [errorAlert mxk_setAccessibilityIdentifier: @"SettingsVCErrorAlert"]; + [self presentViewController:errorAlert animated:YES completion:nil]; + self->currentAlert = errorAlert; } }]; } @@ -2606,11 +2621,11 @@ TableViewSectionsDelegate> __weak typeof(self) weakSelf = self; - currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n settingsUnignoreUser:ignoredUserId] message:nil preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *unignorePrompt = [UIAlertController alertControllerWithTitle:[VectorL10n settingsUnignoreUser:ignoredUserId] message:nil preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [unignorePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -2639,9 +2654,9 @@ TableViewSectionsDelegate> }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [unignorePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -2651,8 +2666,9 @@ TableViewSectionsDelegate> }]]; - [currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCUnignoreAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [unignorePrompt mxk_setAccessibilityIdentifier: @"SettingsVCUnignoreAlert"]; + [self presentViewController:unignorePrompt animated:YES completion:nil]; + currentAlert = unignorePrompt; } } else if (section == SECTION_TAG_ABOUT) @@ -2838,9 +2854,9 @@ TableViewSectionsDelegate> } // Remove ? - currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n settingsRemovePromptTitle] message:promptMsg preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *removePrompt = [UIAlertController alertControllerWithTitle:[VectorL10n settingsRemovePromptTitle] message:promptMsg preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] + [removePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { @@ -2852,7 +2868,7 @@ TableViewSectionsDelegate> }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n remove] + [removePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n remove] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { @@ -2892,8 +2908,9 @@ TableViewSectionsDelegate> }]]; - [currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCRemove3PIDAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [removePrompt mxk_setAccessibilityIdentifier: @"SettingsVCRemove3PIDAlert"]; + [self presentViewController:removePrompt animated:YES completion:nil]; + currentAlert = removePrompt; } } } @@ -2915,9 +2932,9 @@ TableViewSectionsDelegate> NSString *title = [VectorL10n settingsNotificationsDisabledAlertTitle]; NSString *message = [VectorL10n settingsNotificationsDisabledAlertMessage]; - currentAlert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *showSettingsPrompt = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] + [showSettingsPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { @@ -2941,13 +2958,14 @@ TableViewSectionsDelegate> } }]; - [currentAlert addAction:settingsAction]; - currentAlert.preferredAction = settingsAction; + [showSettingsPrompt addAction:settingsAction]; + showSettingsPrompt.preferredAction = settingsAction; - [currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCPushNotificationsAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [showSettingsPrompt mxk_setAccessibilityIdentifier: @"SettingsVCPushNotificationsAlert"]; + [self presentViewController:showSettingsPrompt animated:YES completion:nil]; + currentAlert = showSettingsPrompt; - // Keep off the switch + // Keep the the switch off. sender.on = NO; } else if ([MXKAccountManager sharedManager].activeAccounts.count) @@ -3336,11 +3354,11 @@ TableViewSectionsDelegate> [currentAlert dismissViewControllerAnimated:NO completion:nil]; - currentAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3361,9 +3379,9 @@ TableViewSectionsDelegate> }]]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n retry] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n retry] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3377,8 +3395,9 @@ TableViewSectionsDelegate> }]]; - [currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCSaveChangesFailedAlert"]; - [rootViewController presentViewController:currentAlert animated:YES completion:nil]; + [errorAlert mxk_setAccessibilityIdentifier: @"SettingsVCSaveChangesFailedAlert"]; + [rootViewController presentViewController:errorAlert animated:YES completion:nil]; + currentAlert = errorAlert; } } @@ -3399,13 +3418,13 @@ TableViewSectionsDelegate> [currentAlert dismissViewControllerAnimated:NO completion:nil]; - currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountErrorEmailWrongTitle] - message:[MatrixKitL10n accountErrorEmailWrongDescription] - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountErrorEmailWrongTitle] + message:[MatrixKitL10n accountErrorEmailWrongDescription] + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * action) { + [errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { if (weakSelf) { @@ -3416,8 +3435,9 @@ TableViewSectionsDelegate> }]]; - [currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCAddEmailAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [errorAlert mxk_setAccessibilityIdentifier: @"SettingsVCAddEmailAlert"]; + [self presentViewController:errorAlert animated:YES completion:nil]; + currentAlert = errorAlert; return; } @@ -3509,11 +3529,11 @@ TableViewSectionsDelegate> [currentAlert dismissViewControllerAnimated:NO completion:nil]; __weak typeof(self) weakSelf = self; - currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountErrorMsisdnWrongTitle] - message:[MatrixKitL10n accountErrorMsisdnWrongDescription] - preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountErrorMsisdnWrongTitle] + message:[MatrixKitL10n accountErrorMsisdnWrongDescription] + preferredStyle:UIAlertControllerStyleAlert]; - [currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] + [errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { @@ -3525,8 +3545,9 @@ TableViewSectionsDelegate> }]]; - [currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCAddMsisdnAlert"]; - [self presentViewController:currentAlert animated:YES completion:nil]; + [errorAlert mxk_setAccessibilityIdentifier: @"SettingsVCAddMsisdnAlert"]; + [self presentViewController:errorAlert animated:YES completion:nil]; + currentAlert = errorAlert; return; } @@ -3882,9 +3903,9 @@ TableViewSectionsDelegate> { [self->currentAlert dismissViewControllerAnimated:NO completion:nil]; - self->currentAlert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n settingsPasswordUpdated] preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *successAlert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n settingsPasswordUpdated] preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] + [successAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { @@ -3904,8 +3925,9 @@ TableViewSectionsDelegate> }]]; - [self->currentAlert mxk_setAccessibilityIdentifier:@"SettingsVCOnPasswordUpdatedAlert"]; - [self presentViewController:self->currentAlert animated:YES completion:nil]; + [successAlert mxk_setAccessibilityIdentifier:@"SettingsVCOnPasswordUpdatedAlert"]; + [self presentViewController:successAlert animated:YES completion:nil]; + self->currentAlert = successAlert; } else { @@ -3930,9 +3952,9 @@ TableViewSectionsDelegate> { [self->currentAlert dismissViewControllerAnimated:NO completion:nil]; - self->currentAlert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n settingsFailToUpdatePassword] preferredStyle:UIAlertControllerStyleAlert]; + UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n settingsFailToUpdatePassword] preferredStyle:UIAlertControllerStyleAlert]; - [self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] + [errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { @@ -3953,8 +3975,9 @@ TableViewSectionsDelegate> }]]; - [self->currentAlert mxk_setAccessibilityIdentifier:@"SettingsVCPasswordChangeFailedAlert"]; - [rootViewController presentViewController:self->currentAlert animated:YES completion:nil]; + [errorAlert mxk_setAccessibilityIdentifier:@"SettingsVCPasswordChangeFailedAlert"]; + [rootViewController presentViewController:errorAlert animated:YES completion:nil]; + self->currentAlert = errorAlert; } } diff --git a/changelog.d/5071.bugfix b/changelog.d/5071.bugfix new file mode 100644 index 000000000..40e26a7da --- /dev/null +++ b/changelog.d/5071.bugfix @@ -0,0 +1 @@ +Ensure alerts with weak references are retained until they've been presented. \ No newline at end of file From 30fad9e3ca2eb87893fa57c97655a0afb12880b9 Mon Sep 17 00:00:00 2001 From: Gil Eluard Date: Tue, 2 Nov 2021 07:00:12 +0100 Subject: [PATCH 05/34] Set Show All Rooms to true by default #5076 --- Riot/Managers/Settings/RiotSettings.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Managers/Settings/RiotSettings.swift b/Riot/Managers/Settings/RiotSettings.swift index 9e1ccd05b..193e05ce6 100644 --- a/Riot/Managers/Settings/RiotSettings.swift +++ b/Riot/Managers/Settings/RiotSettings.swift @@ -143,7 +143,7 @@ final class RiotSettings: NSObject { @UserDefault(key: "roomsAllowToJoinPublicRooms", defaultValue: BuildSettings.roomsAllowToJoinPublicRooms, storage: defaults) var roomsAllowToJoinPublicRooms - @UserDefault(key: UserDefaultsKeys.showAllRoomsInHomeSpace, defaultValue: false, storage: defaults) + @UserDefault(key: UserDefaultsKeys.showAllRoomsInHomeSpace, defaultValue: true, storage: defaults) var showAllRoomsInHomeSpace // MARK: - Room Screen From 458b8543cdc02787d1a2dc7f8f9395271ab593f7 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 3 Nov 2021 10:18:27 +0000 Subject: [PATCH 06/34] Ensure DisabledRoomInputToolbarView is used. Fix previewing rooms. Fix favourited DMs in Home. --- .../Common/Recents/RecentsViewController.m | 2 +- .../Service/MatrixSDK/RecentsListService.swift | 2 +- .../GlobalSearch/Rooms/DirectoryViewController.m | 2 +- Riot/Modules/Room/RoomCoordinator.swift | 11 ++++++++++- Riot/Modules/Room/RoomViewController.m | 15 ++++++--------- changelog.d/5079.bugfix | 1 + changelog.d/5081.bugfix | 1 + changelog.d/5083.bugfix | 1 + 8 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 changelog.d/5079.bugfix create mode 100644 changelog.d/5081.bugfix create mode 100644 changelog.d/5083.bugfix diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index f47f08a9d..882cf6fe6 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -1996,7 +1996,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro } // Check whether the user has already joined the selected public room - if ([self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession roomWithRoomId:publicRoom.roomId]) + if ([self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession isJoinedOnRoom:publicRoom.roomId]) { // Open the public room [self showRoomWithRoomId:publicRoom.roomId diff --git a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift index cda8f716d..266a55360 100644 --- a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift +++ b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift @@ -427,7 +427,7 @@ public class RecentsListService: NSObject, RecentsListServiceProtocol { private func updateDirectFetcher(_ fetcher: MXRoomListDataFetcher, for mode: RecentsDataSourceMode) { switch mode { case .home: - fetcher.fetchOptions.filterOptions.notDataTypes = [.invited, .lowPriority] + fetcher.fetchOptions.filterOptions.notDataTypes = [.invited, .favorited, .lowPriority] case .people: fetcher.fetchOptions.filterOptions.notDataTypes = [.lowPriority] default: diff --git a/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m b/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m index 2f6e791d7..254831046 100644 --- a/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m +++ b/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m @@ -190,7 +190,7 @@ MXPublicRoom *publicRoom = [dataSource roomAtIndexPath:indexPath]; // Check whether the user has already joined the selected public room - if ([dataSource.mxSession roomWithRoomId:publicRoom.roomId]) + if ([dataSource.mxSession isJoinedOnRoom:publicRoom.roomId]) { // Open the public room. [self showRoomWithId:publicRoom.roomId inMatrixSession:dataSource.mxSession]; diff --git a/Riot/Modules/Room/RoomCoordinator.swift b/Riot/Modules/Room/RoomCoordinator.swift index dd3ca7d2f..5c8c0a46b 100644 --- a/Riot/Modules/Room/RoomCoordinator.swift +++ b/Riot/Modules/Room/RoomCoordinator.swift @@ -92,7 +92,9 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol { // Detect when view controller has been dismissed by gesture when presented modally (not in full screen). self.roomViewController.presentationController?.delegate = self - if let eventId = self.selectedEventId { + if let previewData = self.parameters.previewData { + self.loadRoomPreview(withData: previewData, completion: completion) + } else if let eventId = self.selectedEventId { self.loadRoom(withId: self.parameters.roomId, and: eventId, completion: completion) } else { self.loadRoom(withId: self.parameters.roomId, completion: completion) @@ -178,6 +180,13 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol { completion?() } } + + private func loadRoomPreview(withData previewData: RoomPreviewData, completion: (() -> Void)?) { + + self.roomViewController.displayRoomPreview(previewData) + + completion?() + } } // MARK: - RoomIdentifiable diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 5b4ad0c2b..072f4f81b 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -1084,16 +1084,12 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (self.roomDataSource) { - // Restore tool bar view and room activities view if none - if (!self.inputToolbarView) - { - [self updateRoomInputToolbarViewClassIfNeeded]; - - [self refreshRoomInputToolbar]; - - self.inputToolbarView.hidden = (self.roomDataSource.state != MXKDataSourceStateReady); - } + // Update the input toolbar class and update the layout + [self updateRoomInputToolbarViewClassIfNeeded]; + self.inputToolbarView.hidden = (self.roomDataSource.state != MXKDataSourceStateReady); + + // Restore room activities view if none if (!self.activitiesView) { // And the extra area @@ -1178,6 +1174,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; } [self updateInputToolBarViewHeight]; + [self refreshRoomInputToolbar]; } } diff --git a/changelog.d/5079.bugfix b/changelog.d/5079.bugfix new file mode 100644 index 000000000..0f6b2baf8 --- /dev/null +++ b/changelog.d/5079.bugfix @@ -0,0 +1 @@ +Message Composer: Ensure there is no text view when the user isn't allowed to send messages. \ No newline at end of file diff --git a/changelog.d/5081.bugfix b/changelog.d/5081.bugfix new file mode 100644 index 000000000..545779610 --- /dev/null +++ b/changelog.d/5081.bugfix @@ -0,0 +1 @@ +Home: Fix bug where favourited DM would be shown in both Favourites and People section. \ No newline at end of file diff --git a/changelog.d/5083.bugfix b/changelog.d/5083.bugfix new file mode 100644 index 000000000..12a915cc6 --- /dev/null +++ b/changelog.d/5083.bugfix @@ -0,0 +1 @@ +Room Previews: Fix room previews not loading. \ No newline at end of file From c9f9eb4505b7184d6a96edfa379807ce54b44ad3 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 3 Nov 2021 11:41:11 +0100 Subject: [PATCH 07/34] SplitViewCoordinator: Fix detail screen reset behaviour. --- Riot/Modules/Application/AppCoordinator.swift | 2 +- .../SplitView/SplitViewCoordinator.swift | 23 ++++++++++++++----- .../SplitView/SplitViewCoordinatorType.swift | 6 +++-- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Riot/Modules/Application/AppCoordinator.swift b/Riot/Modules/Application/AppCoordinator.swift index 32121a0f6..d60faf924 100755 --- a/Riot/Modules/Application/AppCoordinator.swift +++ b/Riot/Modules/Application/AppCoordinator.swift @@ -228,7 +228,7 @@ extension AppCoordinator: LegacyAppDelegateDelegate { } func legacyAppDelegateRestoreEmptyDetailsViewController(_ legacyAppDelegate: LegacyAppDelegate!) { - self.splitViewCoordinator?.restorePlaceholderDetails() + self.splitViewCoordinator?.resetDetails(animated: false) } func legacyAppDelegate(_ legacyAppDelegate: LegacyAppDelegate!, didAddMatrixSession session: MXSession!) { diff --git a/Riot/Modules/SplitView/SplitViewCoordinator.swift b/Riot/Modules/SplitView/SplitViewCoordinator.swift index 479ebf702..ee1ad5af7 100644 --- a/Riot/Modules/SplitView/SplitViewCoordinator.swift +++ b/Riot/Modules/SplitView/SplitViewCoordinator.swift @@ -125,20 +125,20 @@ final class SplitViewCoordinator: NSObject, SplitViewCoordinatorType { } // TODO: Do not expose publicly this method - func restorePlaceholderDetails() { + func resetDetails(animated: Bool) { // Be sure that the primary is then visible too. if splitViewController.displayMode == .primaryHidden { splitViewController.preferredDisplayMode = .allVisible } - self.resetDetailNavigationControllerWithPlaceholder(animated: false) + self.resetDetailNavigationController(animated: animated) // Release the current selected item (room/contact/group...). self.tabBarCoordinator?.releaseSelectedItems() - } + } func popToHome(animated: Bool, completion: (() -> Void)?) { - self.resetDetailNavigationControllerWithPlaceholder(animated: animated) + self.resetDetails(animated: animated) // Force back to the main screen if this is not the one that is displayed self.tabBarCoordinator?.popToHome(animated: animated, completion: completion) @@ -172,6 +172,17 @@ final class SplitViewCoordinator: NSObject, SplitViewCoordinatorType { // Set placeholder screen as root controller of detail navigation controller let placeholderDetailsVC = self.createPlaceholderDetailsViewController() detailNavigationRouter.setRootModule(placeholderDetailsVC, hideNavigationBar: false, animated: animated, popCompletion: nil) + } + + private func resetDetailNavigationController(animated: Bool) { + + if self.splitViewController.isCollapsed { + if let topMostNavigationController = self.selectedNavigationRouter?.modules.last as? UINavigationController, topMostNavigationController == self.detailNavigationController { + self.selectedNavigationRouter?.popModule(animated: animated) + } + } else { + self.resetDetailNavigationControllerWithPlaceholder(animated: animated) + } } private func isPlaceholderShown(from secondaryViewController: UIViewController) -> Bool { @@ -270,7 +281,7 @@ extension SplitViewCoordinator: UISplitViewControllerDelegate { } // Restore detail navigation controller with placeholder as root - self.resetDetailNavigationControllerWithPlaceholder(animated: false) + self.resetDetailNavigationController(animated: false) // Return up to date detail navigation controller // In any cases `detailNavigationController` will be used as secondary view of the split view controller. @@ -353,6 +364,6 @@ extension SplitViewCoordinator: SplitViewMasterPresentableDelegate { } func splitViewMasterPresentableWantsToResetDetail(_ presentable: Presentable) { - self.resetDetailNavigationControllerWithPlaceholder(animated: false) + self.resetDetails(animated: false) } } diff --git a/Riot/Modules/SplitView/SplitViewCoordinatorType.swift b/Riot/Modules/SplitView/SplitViewCoordinatorType.swift index e49a54879..4fd2cfef6 100644 --- a/Riot/Modules/SplitView/SplitViewCoordinatorType.swift +++ b/Riot/Modules/SplitView/SplitViewCoordinatorType.swift @@ -30,8 +30,10 @@ protocol SplitViewCoordinatorType: Coordinator, Presentable { /// - Parameter spaceId: The id of the Space to use. func start(with spaceId: String?) + /// Restore navigation stack and show home screen func popToHome(animated: Bool, completion: (() -> Void)?) - + // TODO: Do not expose publicly this method - func restorePlaceholderDetails() + /// Remove detail screens and display placeholder if needed + func resetDetails(animated: Bool) } From 424ca908e26d1bb2b248465455cdad8608a5300c Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 3 Nov 2021 11:42:11 +0100 Subject: [PATCH 08/34] Update changes --- changelog.d/5084.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5084.bugfix diff --git a/changelog.d/5084.bugfix b/changelog.d/5084.bugfix new file mode 100644 index 000000000..c7826659d --- /dev/null +++ b/changelog.d/5084.bugfix @@ -0,0 +1 @@ +Do not make the placeholder appearing when leaving a room on iPhone. \ No newline at end of file From c6f8dc64f96df184f784a9b573fa6c334e6bbc70 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 3 Nov 2021 18:59:35 +0100 Subject: [PATCH 09/34] SpaceList: Fix a crash when clearing cache or logout. --- .../Spaces/SpaceList/SpaceListViewModel.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift b/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift index 3f9924531..62770e05e 100644 --- a/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift +++ b/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift @@ -131,6 +131,9 @@ final class SpaceListViewModel: SpaceListViewModelType { private func loadData() { guard let session = self.userSessionsService.mainUserSession?.matrixSession else { + // If there is no main session, reset current selection and give an empty section list + // It can happen when the user make a clear cache or logout + self.resetList() return } @@ -243,4 +246,15 @@ final class SpaceListViewModel: SpaceListViewModelType { return spaceViewData.spaceId } } + + private func resetList() { + self.sections = [] + + let selectedIndexPath = IndexPath(row: 0, section: 0) + + self.selectedIndexPath = selectedIndexPath + self.homeIndexPath = selectedIndexPath + + self.update(viewState: .loaded([])) + } } From efbc66fc9e55b753bf9b4598627b6ab38704f4e0 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 3 Nov 2021 19:01:25 +0100 Subject: [PATCH 10/34] Add changes --- changelog.d/5082.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5082.bugfix diff --git a/changelog.d/5082.bugfix b/changelog.d/5082.bugfix new file mode 100644 index 000000000..d5563db47 --- /dev/null +++ b/changelog.d/5082.bugfix @@ -0,0 +1 @@ +FIx a crash when selected space is not home and a clear cache or logout is perfomed. \ No newline at end of file From 4c51e647b258733873b26e29e98638ccdc829e4f Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 3 Nov 2021 19:03:37 +0100 Subject: [PATCH 11/34] Fix typo --- changelog.d/5082.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/5082.bugfix b/changelog.d/5082.bugfix index d5563db47..e7d60ca36 100644 --- a/changelog.d/5082.bugfix +++ b/changelog.d/5082.bugfix @@ -1 +1 @@ -FIx a crash when selected space is not home and a clear cache or logout is perfomed. \ No newline at end of file +Fix a crash when selected space is not home and a clear cache or logout is performed. \ No newline at end of file From 357cbea82cd9f23a57614ab992d82d00392e4a63 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 4 Nov 2021 11:48:06 +0100 Subject: [PATCH 12/34] SettingsVC: Update about section footer text. --- .../Modules/Settings/SettingsViewController.m | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 7ecfcb533..e7b8be3b3 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -541,13 +541,8 @@ TableViewSectionsDelegate> sectionAbout.headerTitle = VectorL10n.settingsAbout; if (BuildSettings.settingsScreenShowAdvancedSettings) - { - sectionAbout.footerTitle = [NSString stringWithFormat:@"Element %@ (%@) / Olm %@\n%@\n%@", - AppInfo.current.appVersion.bundleShortVersion, - AppInfo.current.appVersion.bundleVersion, - [OLMKit versionString], - [MatrixKitL10n settingsConfigUserId:account.mxCredentials.userId], - [MatrixKitL10n settingsConfigHomeServer:account.mxCredentials.homeServer]]; + { + sectionAbout.footerTitle = [self buildAboutSectionFooterTitleWithAccount:account]; } [tmpSections addObject:sectionAbout]; @@ -1410,6 +1405,35 @@ TableViewSectionsDelegate> } } +- (NSString*)buildAboutSectionFooterTitleWithAccount:(MXKAccount*)account +{ + NSMutableString *footerText = [NSMutableString new]; + + AppInfo *appInfo = AppInfo.current; + + NSString *appName = appInfo.displayName; + NSString *appVersion = appInfo.appVersion.bundleShortVersion; + NSString *buildVersion = appInfo.appVersion.bundleVersion; + + NSString *appVersionInfo = [NSString stringWithFormat:@"%@ %@ (%@)", appName, appVersion, buildVersion]; + + NSString *loggedUserInfo = [MatrixKitL10n settingsConfigUserId:account.mxCredentials.userId]; + + NSString *homeserverInfo = [MatrixKitL10n settingsConfigHomeServer:account.mxCredentials.homeServer]; + + NSString *sdkVersionInfo = [NSString stringWithFormat:@"Matrix SDK %@", MatrixSDKVersion]; + + NSString *olmVersionInfo = [NSString stringWithFormat:@"OLM %@", [OLMKit versionString]]; + + [footerText appendFormat:@"%@\n", loggedUserInfo]; + [footerText appendFormat:@"%@\n", homeserverInfo]; + [footerText appendFormat:@"%@\n", appVersionInfo]; + [footerText appendFormat:@"%@\n", sdkVersionInfo]; + [footerText appendFormat:@"%@", olmVersionInfo]; + + return [footerText copy]; +} + #pragma mark - 3Pid Add - (void)showAuthenticationIfNeededForAdding:(MX3PIDMedium)medium withSession:(MXSession*)session completion:(void (^)(NSDictionary* authParams))completion From 972a0ec6dbd730dff6aac670e253986c216f75f2 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 4 Nov 2021 11:50:06 +0100 Subject: [PATCH 13/34] Add changes --- changelog.d/5090.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5090.change diff --git a/changelog.d/5090.change b/changelog.d/5090.change new file mode 100644 index 000000000..c4d0c6cd2 --- /dev/null +++ b/changelog.d/5090.change @@ -0,0 +1 @@ +Settings: Update about section footer text. \ No newline at end of file From 1267cf6ee92bb5e8350d2ecedb3a0f41b848339b Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 10 Nov 2021 18:42:29 +0100 Subject: [PATCH 14/34] MXSession: Add logs to track if E2EE is enabled by default on the current HS. --- Riot/Categories/MXSession+Riot.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Riot/Categories/MXSession+Riot.m b/Riot/Categories/MXSession+Riot.m index 901c58406..05d5cd624 100644 --- a/Riot/Categories/MXSession+Riot.m +++ b/Riot/Categories/MXSession+Riot.m @@ -65,6 +65,7 @@ } else { + MXLogInfo(@"[MXSession] E2EE is disabled by default on this homeserver"); success(NO); return [MXHTTPOperation new]; } From 5cd7bfdef046aac02e5afb16d2b5f0e9c7b192aa Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 10 Nov 2021 18:54:39 +0100 Subject: [PATCH 15/34] MXSession: Add logs to track if E2EE is enabled by default on the current HS. --- Riot/Categories/MXSession+Riot.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Categories/MXSession+Riot.m b/Riot/Categories/MXSession+Riot.m index 05d5cd624..f26fda0b1 100644 --- a/Riot/Categories/MXSession+Riot.m +++ b/Riot/Categories/MXSession+Riot.m @@ -65,7 +65,7 @@ } else { - MXLogInfo(@"[MXSession] E2EE is disabled by default on this homeserver"); + MXLogWarning(@"[MXSession] E2EE is disabled by default on this homeserver."); success(NO); return [MXHTTPOperation new]; } From 21f114debac3a875d069fc1333ee639f1ba607b8 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Wed, 10 Nov 2021 18:58:34 +0100 Subject: [PATCH 16/34] MXSession: Add logs to track if E2EE is enabled by default on the current HS. --- Riot/Categories/MXSession+Riot.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Categories/MXSession+Riot.m b/Riot/Categories/MXSession+Riot.m index f26fda0b1..f89dc1f62 100644 --- a/Riot/Categories/MXSession+Riot.m +++ b/Riot/Categories/MXSession+Riot.m @@ -65,7 +65,7 @@ } else { - MXLogWarning(@"[MXSession] E2EE is disabled by default on this homeserver."); + MXLogWarning(@"[MXSession] E2EE is disabled by default on this homeserver.\nWellknown content: %@", self.homeserverWellknown.JSONDictionary); success(NO); return [MXHTTPOperation new]; } From 09bb04ad319224a32eb0cb49dbf7e62204409a5d Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 11 Nov 2021 09:28:12 +0000 Subject: [PATCH 17/34] Add changelog. Remove whitespace. --- Riot/Categories/MXSession+Riot.m | 2 +- changelog.d/5129.change | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/5129.change diff --git a/Riot/Categories/MXSession+Riot.m b/Riot/Categories/MXSession+Riot.m index f89dc1f62..069e13ca6 100644 --- a/Riot/Categories/MXSession+Riot.m +++ b/Riot/Categories/MXSession+Riot.m @@ -65,7 +65,7 @@ } else { - MXLogWarning(@"[MXSession] E2EE is disabled by default on this homeserver.\nWellknown content: %@", self.homeserverWellknown.JSONDictionary); + MXLogWarning(@"[MXSession] E2EE is disabled by default on this homeserver.\nWellknown content: %@", self.homeserverWellknown.JSONDictionary); success(NO); return [MXHTTPOperation new]; } diff --git a/changelog.d/5129.change b/changelog.d/5129.change new file mode 100644 index 000000000..86738a989 --- /dev/null +++ b/changelog.d/5129.change @@ -0,0 +1 @@ +MXSession: Add logs to track if E2EE is enabled by default on the current HS. \ No newline at end of file From d36e8f8d34f0127cd464731a0ff66f1bb631e72b Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 11 Nov 2021 15:43:43 +0000 Subject: [PATCH 18/34] Refresh RecentsListService when switching modes. --- .../Recents/Service/MatrixSDK/RecentsListService.swift | 7 ++++++- changelog.d/5105.bugfix | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog.d/5105.bugfix diff --git a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift index 3261caa22..6651fddba 100644 --- a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift +++ b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift @@ -20,7 +20,12 @@ import Foundation public class RecentsListService: NSObject, RecentsListServiceProtocol { private weak var session: MXSession? - public private(set) var mode: RecentsDataSourceMode + public private(set) var mode: RecentsDataSourceMode { + didSet { + refresh() + } + } + public private(set) var query: String? public private(set) var space: MXSpace? diff --git a/changelog.d/5105.bugfix b/changelog.d/5105.bugfix new file mode 100644 index 000000000..4b833133a --- /dev/null +++ b/changelog.d/5105.bugfix @@ -0,0 +1 @@ +Fix room ordering when switching between Home and People/Rooms/Favourites. \ No newline at end of file From 9d256e1c5cc40d098eec6695e9622caf77f3202a Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Thu, 11 Nov 2021 19:52:21 +0300 Subject: [PATCH 19/34] Implement new summary properties --- .../Recents/Service/Mock/MockRoomSummary.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Riot/Modules/Common/Recents/Service/Mock/MockRoomSummary.swift b/Riot/Modules/Common/Recents/Service/Mock/MockRoomSummary.swift index 713932423..c211db025 100644 --- a/Riot/Modules/Common/Recents/Service/Mock/MockRoomSummary.swift +++ b/Riot/Modules/Common/Recents/Service/Mock/MockRoomSummary.swift @@ -60,6 +60,18 @@ public class MockRoomSummary: NSObject, MXRoomSummaryProtocol { public var highlightCount: UInt = 0 + public var hasAnyUnread: Bool { + return localUnreadEventCount > 0 + } + + public var hasAnyNotification: Bool { + return notificationCount > 0 + } + + public var hasAnyHighlight: Bool { + return highlightCount > 0 + } + public var isDirect: Bool { return isTyped(.direct) } From c2baaeccdf48de49c4bf9894617b381a3d26588b Mon Sep 17 00:00:00 2001 From: opusforlife2 <53176348+opusforlife2@users.noreply.github.com> Date: Fri, 12 Nov 2021 15:48:35 +0000 Subject: [PATCH 20/34] Address PR review --- .github/ISSUE_TEMPLATE/bug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index d95e16935..8ba0402c6 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -23,7 +23,7 @@ body: - type: textarea id: result attributes: - label: Intended result and actual result + label: Outcome placeholder: Tell us what went wrong value: | #### What did you expect? From 60be73071f0397f55ee2c823a5bbc84f760380b5 Mon Sep 17 00:00:00 2001 From: Ekaterina Gerasimova Date: Tue, 16 Nov 2021 10:10:36 +0000 Subject: [PATCH 21/34] Update issue triage automation for P1 and need info Move P1 issues to app and crypto team boards. Move unlabelled issues without X-Needs-Info out of column on Triage board. --- .github/workflows/triage-move-unlabelled.yml | 35 +++++++++++++ .github/workflows/triage-priority-bugs.yml | 55 ++++++++++++++++++++ changelog.d/5153.misc | 1 + 3 files changed, 91 insertions(+) create mode 100644 .github/workflows/triage-move-unlabelled.yml create mode 100644 .github/workflows/triage-priority-bugs.yml create mode 100644 changelog.d/5153.misc diff --git a/.github/workflows/triage-move-unlabelled.yml b/.github/workflows/triage-move-unlabelled.yml new file mode 100644 index 000000000..94bd049b9 --- /dev/null +++ b/.github/workflows/triage-move-unlabelled.yml @@ -0,0 +1,35 @@ +name: Move unlabelled from needs info columns to triaged + +on: + issues: + types: [unlabeled] + +jobs: + Move_Unabeled_Issue_On_Project_Board: + name: Move no longer X-Needs-Info issues to Triaged + runs-on: ubuntu-latest + if: > + ${{ + !contains(github.event.issue.labels.*.name, 'X-Needs-Info') }} + env: + BOARD_NAME: "Issue triage" + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + ISSUE: ${{ github.event.issue.number }} + steps: + - name: Check if issue is already in "${{ env.BOARD_NAME }}" + run: | + if curl -i -H 'Content-Type: application/json' -H "Authorization: bearer ${{ secrets.GITHUB_TOKEN }}" -X POST -d '{"query": "query($issue: Int!, $owner: String!, $repo: String!) { repository(owner: $owner, name: $repo) { issue(number: $issue) { projectCards { nodes { project { name } } } } } } ", "variables" : "{ \"issue\": '${ISSUE}', \"owner\": \"'${OWNER}'\", \"repo\": \"'${REPO}'\" }" }' https://api.github.com/graphql | grep "\b$BOARD_NAME\b"; then + echo "Issue is already in Project '$BOARD_NAME', proceeding"; + echo "ALREADY_IN_BOARD=true" >> $GITHUB_ENV + else + echo "Issue is not in project '$BOARD_NAME', cancelling this workflow" + echo "ALREADY_IN_BOARD=false" >> $GITHUB_ENV + fi + - name: Move issue + uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 + if: ${{ env.ALREADY_IN_BOARD == 'true' }} + with: + project: Issue triage + column: Triaged + repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/.github/workflows/triage-priority-bugs.yml b/.github/workflows/triage-priority-bugs.yml new file mode 100644 index 000000000..c2147d2f6 --- /dev/null +++ b/.github/workflows/triage-priority-bugs.yml @@ -0,0 +1,55 @@ +name: Move P1 issues into the P1 column for the App Team and Crypto team + +on: + issues: + types: [labeled, unlabeled] + +jobs: + p1_issues_to_team_workboard: + runs-on: ubuntu-latest + if: > + (!contains(github.event.issue.labels.*.name, 'A-E2EE') && + !contains(github.event.issue.labels.*.name, 'A-E2EE-Cross-Signing') && + !contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') && + !contains(github.event.issue.labels.*.name, 'A-E2EE-Key-Backup') && + !contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification') && + !contains(github.event.issue.labels.*.name, 'A-Spaces') && + !contains(github.event.issue.labels.*.name, 'A-Spaces-Settings') && + !contains(github.event.issue.labels.*.name, 'A-Subspaces')) && + (contains(github.event.issue.labels.*.name, 'T-Defect') && + contains(github.event.issue.labels.*.name, 'S-Critical') && + (contains(github.event.issue.labels.*.name, 'O-Frequent') || + contains(github.event.issue.labels.*.name, 'O-Occasional')) || + contains(github.event.issue.labels.*.name, 'S-Major') && + contains(github.event.issue.labels.*.name, 'O-Frequent') || + contains(github.event.issue.labels.*.name, 'A11y') && + contains(github.event.issue.labels.*.name, 'O-Frequent')) + steps: + - uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 + with: + project: iOS App Team + column: P1 + repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }} + + P1_issues_to_crypto_team_workboard: + runs-on: ubuntu-latest + if: > + (contains(github.event.issue.labels.*.name, 'A-E2EE') || + contains(github.event.issue.labels.*.name, 'A-E2EE-Cross-Signing') || + contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || + contains(github.event.issue.labels.*.name, 'A-E2EE-Key-Backup') || + contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification')) && + (contains(github.event.issue.labels.*.name, 'T-Defect') && + contains(github.event.issue.labels.*.name, 'S-Critical') && + (contains(github.event.issue.labels.*.name, 'O-Frequent') || + contains(github.event.issue.labels.*.name, 'O-Occasional')) || + contains(github.event.issue.labels.*.name, 'S-Major') && + contains(github.event.issue.labels.*.name, 'O-Frequent') || + contains(github.event.issue.labels.*.name, 'A11y') && + contains(github.event.issue.labels.*.name, 'O-Frequent')) + steps: + - uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 + with: + project: Crypto Team + column: Ready + repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/changelog.d/5153.misc b/changelog.d/5153.misc new file mode 100644 index 000000000..5cfb4f32e --- /dev/null +++ b/changelog.d/5153.misc @@ -0,0 +1 @@ +Update automation for issue triage From 88dba32a422c602f8474d7b0ef9f6de3572ec2e5 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 16 Nov 2021 13:41:41 +0200 Subject: [PATCH 22/34] Fix build after changing aggregation method limits from UInt to Int in the SDK. --- Riot/Modules/Room/EditHistory/EditHistoryViewModel.swift | 2 +- .../Modules/Room/ReactionHistory/ReactionHistoryViewModel.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Riot/Modules/Room/EditHistory/EditHistoryViewModel.swift b/Riot/Modules/Room/EditHistory/EditHistoryViewModel.swift index 2f9b4f0d0..ea27098e1 100644 --- a/Riot/Modules/Room/EditHistory/EditHistoryViewModel.swift +++ b/Riot/Modules/Room/EditHistory/EditHistoryViewModel.swift @@ -105,7 +105,7 @@ final class EditHistoryViewModel: EditHistoryViewModelType { self.update(viewState: .loading) - self.operation = self.aggregations.replaceEvents(forEvent: self.event.eventId, isEncrypted: self.event.isEncrypted, inRoom: self.roomId, from: self.nextBatch, limit: Pagination.count, success: { [weak self] (response) in + self.operation = self.aggregations.replaceEvents(forEvent: self.event.eventId, isEncrypted: self.event.isEncrypted, inRoom: self.roomId, from: self.nextBatch, limit: Int(Pagination.count), success: { [weak self] (response) in guard let sself = self else { return } diff --git a/Riot/Modules/Room/ReactionHistory/ReactionHistoryViewModel.swift b/Riot/Modules/Room/ReactionHistory/ReactionHistoryViewModel.swift index b98ec19c5..69042ee5f 100644 --- a/Riot/Modules/Room/ReactionHistory/ReactionHistoryViewModel.swift +++ b/Riot/Modules/Room/ReactionHistory/ReactionHistoryViewModel.swift @@ -108,7 +108,7 @@ final class ReactionHistoryViewModel: ReactionHistoryViewModelType { self.update(viewState: .loading) - self.operation = self.aggregations.reactionsEvents(forEvent: self.eventId, inRoom: self.roomId, from: self.nextBatch, limit: Pagination.count, success: { [weak self] (response) in + self.operation = self.aggregations.reactionsEvents(forEvent: self.eventId, inRoom: self.roomId, from: self.nextBatch, limit: Int(Pagination.count), success: { [weak self] (response) in guard let self = self else { return } From e7ef9fd218a5c59a27c659f19715e13c6697caaa Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 16 Nov 2021 12:00:20 +0000 Subject: [PATCH 23/34] Ignore badge updates for virtual rooms. --- Config/BuildSettings.swift | 2 ++ RiotNSE/NotificationService.swift | 49 ++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/Config/BuildSettings.swift b/Config/BuildSettings.swift index 2d080c6d2..4c7927f5e 100644 --- a/Config/BuildSettings.swift +++ b/Config/BuildSettings.swift @@ -154,6 +154,8 @@ final class BuildSettings: NSObject { } static let stunServerFallbackUrlString: String? = "stun:turn.matrix.org" + // For use in conjunction with virtual rooms. Events from virtual rooms should not be reflected in badge count for unread messages. + static let ignoreBadgeUpdatesForVirtualRooms = true // MARK: - Public rooms Directory #warning("Unused build setting: should this be implemented in ShowDirectory?") diff --git a/RiotNSE/NotificationService.swift b/RiotNSE/NotificationService.swift index 0b2ff4758..76192fee7 100644 --- a/RiotNSE/NotificationService.swift +++ b/RiotNSE/NotificationService.swift @@ -53,6 +53,12 @@ class NotificationService: UNNotificationServiceExtension { private lazy var configuration: Configurable = { return CommonConfiguration() }() + private lazy var mxRestClient: MXRestClient? = { + guard let userAccount = userAccount else { + return nil + } + return MXRestClient(credentials: userAccount.mxCredentials, unrecognizedCertificateHandler: nil) + }() private static var isLoggerInitialized: Bool = false private lazy var pushGatewayRestClient: MXPushGatewayRestClient = { let url = URL(string: BuildSettings.serverConfigSygnalAPIUrlString)! @@ -222,7 +228,7 @@ class NotificationService: UNNotificationServiceExtension { return } - self.notificationContent(forEvent: event, forAccount: userAccount) { (notificationContent) in + self.notificationContent(forEvent: event, forAccount: userAccount) { (notificationContent, ignoreBadgeUpdate) in var isUnwantedNotification = false // Modify the notification content here... @@ -240,6 +246,10 @@ class NotificationService: UNNotificationServiceExtension { isUnwantedNotification = true } + if ignoreBadgeUpdate { + content.badge = nil + } + if self.ongoingVoIPPushRequests[event.eventId] == true { // modify the best attempt content, to be able to use in the future self.bestAttemptContents[event.eventId] = content @@ -279,10 +289,10 @@ class NotificationService: UNNotificationServiceExtension { MXLog.debug("--------------------------------------------------------------------------------") } - private func notificationContent(forEvent event: MXEvent, forAccount account: MXKAccount, onComplete: @escaping (UNNotificationContent?) -> Void) { + private func notificationContent(forEvent event: MXEvent, forAccount account: MXKAccount, onComplete: @escaping (UNNotificationContent?, Bool) -> Void) { guard let content = event.content, content.count > 0 else { MXLog.debug("[NotificationService] notificationContentForEvent: empty event content") - onComplete(nil) + onComplete(nil, false) return } @@ -298,7 +308,7 @@ class NotificationService: UNNotificationServiceExtension { var notificationTitle: String? var notificationBody: String? var additionalUserInfo: [AnyHashable: Any]? - + var ignoreBadgeUpdate = false var threadIdentifier: String? = roomId let currentUserId = account.mxCredentials.userId let roomDisplayName = roomSummary?.displayname @@ -322,6 +332,10 @@ class NotificationService: UNNotificationServiceExtension { if let callInviteContent = MXCallInviteEventContent(fromJSON: event.content), callInviteContent.lifetime > event.age, (callInviteContent.lifetime - event.age) > UInt(NSE.Constants.timeNeededToSendVoIPPushes * MSEC_PER_SEC) { + if BuildSettings.ignoreBadgeUpdatesForVirtualRooms { + self.sendReadReceipt(forEvent: event) + ignoreBadgeUpdate = true + } self.sendVoipPush(forEvent: event) } else { MXLog.debug("[NotificationService] notificationContent: Do not attempt to send a VoIP push, there is not enough time to process it.") @@ -351,7 +365,7 @@ class NotificationService: UNNotificationServiceExtension { #warning("In practice, this only hides the notification's content. An empty notification may be less useful in this instance?") // Ignore this notif. MXLog.debug("[NotificationService] notificationContentForEvent: Ignore non highlighted notif in mentions only room") - onComplete(nil) + onComplete(nil, false) return } } @@ -483,7 +497,7 @@ class NotificationService: UNNotificationServiceExtension { guard notificationBody != nil else { MXLog.debug("[NotificationService] notificationContentForEvent: notificationBody is nil") - onComplete(nil) + onComplete(nil, false) return } @@ -496,10 +510,10 @@ class NotificationService: UNNotificationServiceExtension { additionalInfo: additionalUserInfo) MXLog.debug("[NotificationService] notificationContentForEvent: Calling onComplete.") - onComplete(notificationContent) + onComplete(notificationContent, ignoreBadgeUpdate) case .failure(let error): MXLog.debug("[NotificationService] notificationContentForEvent: error: \(error)") - onComplete(nil) + onComplete(nil, false) } }) } @@ -710,4 +724,23 @@ class NotificationService: UNNotificationServiceExtension { } } + private func sendReadReceipt(forEvent event: MXEvent) { + guard let mxRestClient = mxRestClient else { + MXLog.error("[NotificationService] sendVoipReadReceipt: Missing mxRestClient for read receipt request.") + return + } + guard let eventId = event.eventId, + let roomId = event.roomId else { + MXLog.error("[NotificationService] sendVoipReadReceipt: Event information missing for read receipt request.") + return + } + + mxRestClient.sendReadReceipt(toRoom: roomId, forEvent: eventId) { response in + if response.isSuccess { + MXLog.debug("[NotificationService] sendVoipReadReceipt: Read receipt send successfully.") + } else if let error = response.error { + MXLog.error("[NotificationService] sendVoipReadReceipt: Read receipt send failed with error \(error).") + } + } + } } From 91b575537c0b60177c7700b50c81c54e28954ea8 Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 16 Nov 2021 12:19:35 +0000 Subject: [PATCH 24/34] changelog --- changelog.d/5155.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5155.bugfix diff --git a/changelog.d/5155.bugfix b/changelog.d/5155.bugfix new file mode 100644 index 000000000..0d821ee92 --- /dev/null +++ b/changelog.d/5155.bugfix @@ -0,0 +1 @@ +Add BuildSetting to ignore badge updates from virtual rooms. From 2214d818c983981446186dbb1aa3d3b276054cd8 Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 16 Nov 2021 12:24:21 +0000 Subject: [PATCH 25/34] Fix logging function name --- RiotNSE/NotificationService.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RiotNSE/NotificationService.swift b/RiotNSE/NotificationService.swift index 76192fee7..6c10eb6c8 100644 --- a/RiotNSE/NotificationService.swift +++ b/RiotNSE/NotificationService.swift @@ -726,20 +726,20 @@ class NotificationService: UNNotificationServiceExtension { private func sendReadReceipt(forEvent event: MXEvent) { guard let mxRestClient = mxRestClient else { - MXLog.error("[NotificationService] sendVoipReadReceipt: Missing mxRestClient for read receipt request.") + MXLog.error("[NotificationService] sendReadReceipt: Missing mxRestClient for read receipt request.") return } guard let eventId = event.eventId, let roomId = event.roomId else { - MXLog.error("[NotificationService] sendVoipReadReceipt: Event information missing for read receipt request.") + MXLog.error("[NotificationService] sendReadReceipt: Event information missing for read receipt request.") return } mxRestClient.sendReadReceipt(toRoom: roomId, forEvent: eventId) { response in if response.isSuccess { - MXLog.debug("[NotificationService] sendVoipReadReceipt: Read receipt send successfully.") + MXLog.debug("[NotificationService] sendReadReceipt: Read receipt send successfully.") } else if let error = response.error { - MXLog.error("[NotificationService] sendVoipReadReceipt: Read receipt send failed with error \(error).") + MXLog.error("[NotificationService] sendReadReceipt: Read receipt send failed with error \(error).") } } } From 9b3d58514069babcbd41fb003c53da9a32691603 Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 16 Nov 2021 14:40:22 +0000 Subject: [PATCH 26/34] Remove build setting and get check virtual info --- RiotNSE/NotificationService.swift | 92 ++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 25 deletions(-) diff --git a/RiotNSE/NotificationService.swift b/RiotNSE/NotificationService.swift index 6c10eb6c8..b0d14f089 100644 --- a/RiotNSE/NotificationService.swift +++ b/RiotNSE/NotificationService.swift @@ -332,11 +332,25 @@ class NotificationService: UNNotificationServiceExtension { if let callInviteContent = MXCallInviteEventContent(fromJSON: event.content), callInviteContent.lifetime > event.age, (callInviteContent.lifetime - event.age) > UInt(NSE.Constants.timeNeededToSendVoIPPushes * MSEC_PER_SEC) { - if BuildSettings.ignoreBadgeUpdatesForVirtualRooms { - self.sendReadReceipt(forEvent: event) - ignoreBadgeUpdate = true + NotificationService.backgroundSyncService.roomAccountData(forRoomId: roomId) { response in + if let accountData = response.value, accountData.virtualRoomInfo.isVirtual { + self.sendReadReceipt(forEvent: event) + ignoreBadgeUpdate = true + } + self.sendVoipPush(forEvent: event) + self.validateNotificationContentAndComplete( + notificationTitle: notificationTitle, + notificationBody: notificationBody, + additionalUserInfo: additionalUserInfo, + ignoreBadgeUpdate: ignoreBadgeUpdate, + threadIdentifier: threadIdentifier, + currentUserId: currentUserId, + event: event, + pushRule: pushRule, + onComplete: onComplete + ) } - self.sendVoipPush(forEvent: event) + return } else { MXLog.debug("[NotificationService] notificationContent: Do not attempt to send a VoIP push, there is not enough time to process it.") } @@ -489,28 +503,18 @@ class NotificationService: UNNotificationServiceExtension { break } - if self.localAuthenticationService.isProtectionSet { - MXLog.debug("[NotificationService] notificationContentForEvent: Resetting title and body because app protection is set") - notificationBody = NSString.localizedUserNotificationString(forKey: "MESSAGE_PROTECTED", arguments: []) - notificationTitle = nil - } - guard notificationBody != nil else { - MXLog.debug("[NotificationService] notificationContentForEvent: notificationBody is nil") - onComplete(nil, false) - return - } - - let notificationContent = self.notificationContent(withTitle: notificationTitle, - body: notificationBody, - threadIdentifier: threadIdentifier, - userId: currentUserId, - event: event, - pushRule: pushRule, - additionalInfo: additionalUserInfo) - - MXLog.debug("[NotificationService] notificationContentForEvent: Calling onComplete.") - onComplete(notificationContent, ignoreBadgeUpdate) + self.validateNotificationContentAndComplete( + notificationTitle: notificationTitle, + notificationBody: notificationBody, + additionalUserInfo: additionalUserInfo, + ignoreBadgeUpdate: ignoreBadgeUpdate, + threadIdentifier: threadIdentifier, + currentUserId: currentUserId, + event: event, + pushRule: pushRule, + onComplete: onComplete + ) case .failure(let error): MXLog.debug("[NotificationService] notificationContentForEvent: error: \(error)") onComplete(nil, false) @@ -518,6 +522,44 @@ class NotificationService: UNNotificationServiceExtension { }) } + private func validateNotificationContentAndComplete( + notificationTitle: String?, + notificationBody: String?, + additionalUserInfo: [AnyHashable: Any]?, + ignoreBadgeUpdate: Bool, + threadIdentifier: String?, + currentUserId: String?, + event: MXEvent, + pushRule: MXPushRule?, + onComplete: @escaping (UNNotificationContent?, Bool) -> Void + ) { + + var validatedNotificationBody: String? = notificationBody + var validatedNotificationTitle: String? = notificationTitle + if self.localAuthenticationService.isProtectionSet { + MXLog.debug("[NotificationService] notificationContentForEvent: Resetting title and body because app protection is set") + validatedNotificationBody = NSString.localizedUserNotificationString(forKey: "MESSAGE_PROTECTED", arguments: []) + validatedNotificationTitle = nil + } + + guard notificationBody != nil else { + MXLog.debug("[NotificationService] notificationContentForEvent: notificationBody is nil") + onComplete(nil, false) + return + } + + let notificationContent = self.notificationContent(withTitle: validatedNotificationTitle, + body: validatedNotificationBody, + threadIdentifier: threadIdentifier, + userId: currentUserId, + event: event, + pushRule: pushRule, + additionalInfo: additionalUserInfo) + + MXLog.debug("[NotificationService] notificationContentForEvent: Calling onComplete.") + onComplete(notificationContent, ignoreBadgeUpdate) + } + /// Returns the default title for message notifications. /// - Parameters: /// - eventSenderName: The displayname of the sender. From 5de508191d89742c6d5aa810e3333969241f4c96 Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 16 Nov 2021 14:55:07 +0000 Subject: [PATCH 27/34] Fix changelog description --- changelog.d/5155.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/5155.bugfix b/changelog.d/5155.bugfix index 0d821ee92..1e21bfc43 100644 --- a/changelog.d/5155.bugfix +++ b/changelog.d/5155.bugfix @@ -1 +1 @@ -Add BuildSetting to ignore badge updates from virtual rooms. +Ignore badge updates from virtual rooms. From 05309f6be40f6164a376e569a5b3da221de5847a Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 16 Nov 2021 15:02:52 +0000 Subject: [PATCH 28/34] Remove buildsetting --- Config/BuildSettings.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/Config/BuildSettings.swift b/Config/BuildSettings.swift index 4c7927f5e..44c32742c 100644 --- a/Config/BuildSettings.swift +++ b/Config/BuildSettings.swift @@ -154,9 +154,6 @@ final class BuildSettings: NSObject { } static let stunServerFallbackUrlString: String? = "stun:turn.matrix.org" - // For use in conjunction with virtual rooms. Events from virtual rooms should not be reflected in badge count for unread messages. - static let ignoreBadgeUpdatesForVirtualRooms = true - // MARK: - Public rooms Directory #warning("Unused build setting: should this be implemented in ShowDirectory?") static let publicRoomsAllowServerChange: Bool = true From 6b7e3d43d65c3747c71a481cf71920082ff1fa3e Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 16 Nov 2021 16:16:04 +0000 Subject: [PATCH 29/34] Don't wait for accountData to start voip call. --- RiotNSE/NotificationService.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RiotNSE/NotificationService.swift b/RiotNSE/NotificationService.swift index b0d14f089..99a9bba12 100644 --- a/RiotNSE/NotificationService.swift +++ b/RiotNSE/NotificationService.swift @@ -337,7 +337,6 @@ class NotificationService: UNNotificationServiceExtension { self.sendReadReceipt(forEvent: event) ignoreBadgeUpdate = true } - self.sendVoipPush(forEvent: event) self.validateNotificationContentAndComplete( notificationTitle: notificationTitle, notificationBody: notificationBody, @@ -350,6 +349,7 @@ class NotificationService: UNNotificationServiceExtension { onComplete: onComplete ) } + self.sendVoipPush(forEvent: event) return } else { MXLog.debug("[NotificationService] notificationContent: Do not attempt to send a VoIP push, there is not enough time to process it.") @@ -537,13 +537,13 @@ class NotificationService: UNNotificationServiceExtension { var validatedNotificationBody: String? = notificationBody var validatedNotificationTitle: String? = notificationTitle if self.localAuthenticationService.isProtectionSet { - MXLog.debug("[NotificationService] notificationContentForEvent: Resetting title and body because app protection is set") + MXLog.debug("[NotificationService] validateNotificationContentAndComplete: Resetting title and body because app protection is set") validatedNotificationBody = NSString.localizedUserNotificationString(forKey: "MESSAGE_PROTECTED", arguments: []) validatedNotificationTitle = nil } - guard notificationBody != nil else { - MXLog.debug("[NotificationService] notificationContentForEvent: notificationBody is nil") + guard validatedNotificationBody != nil else { + MXLog.debug("[NotificationService] validateNotificationContentAndComplete: notificationBody is nil") onComplete(nil, false) return } @@ -556,7 +556,7 @@ class NotificationService: UNNotificationServiceExtension { pushRule: pushRule, additionalInfo: additionalUserInfo) - MXLog.debug("[NotificationService] notificationContentForEvent: Calling onComplete.") + MXLog.debug("[NotificationService] validateNotificationContentAndComplete: Calling onComplete.") onComplete(notificationContent, ignoreBadgeUpdate) } From 148fd7afb8b2704e0d02465331db7eac476bcb5f Mon Sep 17 00:00:00 2001 From: Ekaterina Gerasimova Date: Wed, 17 Nov 2021 08:48:29 +0000 Subject: [PATCH 30/34] Add automation to move labelled issues Move X-Needs-Info on the triage board to needs info column Design issues to Design team Spaces to Delight Voice messages to Voice message board Threads to threads board Fixes #5143 Covered by changelog entry 5153.misc --- .github/workflows/triage-move-labelled.yml | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 .github/workflows/triage-move-labelled.yml diff --git a/.github/workflows/triage-move-labelled.yml b/.github/workflows/triage-move-labelled.yml new file mode 100644 index 000000000..440fc42cd --- /dev/null +++ b/.github/workflows/triage-move-labelled.yml @@ -0,0 +1,124 @@ +name: Move labelled issues to correct boards and columns + +on: + issues: + types: [labeled] + +jobs: + move_needs_info_issues: + name: Move X-Needs-Info issues to Need info on triage board + runs-on: ubuntu-latest + steps: + - uses: konradpabjan/move-labeled-or-milestoned-issue@219d384e03fa4b6460cd24f9f37d19eb033a4338 + with: + action-token: "${{ secrets.ELEMENT_BOT_TOKEN }}" + project-url: "https://github.com/vector-im/element-android/projects/4" + column-name: "Need info" + label-name: "X-Needs-Info" + + add_priority_design_issues_to_project: + name: Move priority X-Needs-Design issues to Design project board + runs-on: ubuntu-latest + if: > + contains(github.event.issue.labels.*.name, 'X-Needs-Design') && + (contains(github.event.issue.labels.*.name, 'O-Frequent') || + contains(github.event.issue.labels.*.name, 'O-Occasional')) && + (contains(github.event.issue.labels.*.name, 'S-Critical') || + contains(github.event.issue.labels.*.name, 'S-Major') || + contains(github.event.issue.labels.*.name, 'S-Minor')) + steps: + - uses: octokit/graphql-action@v2.x + id: add_to_project + with: + headers: '{"GraphQL-Features": "projects_next_graphql"}' + query: | + mutation add_to_project($projectid:String!,$contentid:String!) { + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { + projectNextItem { + id + } + } + } + projectid: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAM0swc0sUA" + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + + move_spaces_issues: + name: Move Spaces issues to Delight project board + runs-on: ubuntu-latest + if: > + contains(github.event.issue.labels.*.name, 'A-Spaces') || + contains(github.event.issue.labels.*.name, 'A-Space-Settings') || + contains(github.event.issue.labels.*.name, 'A-Subspaces') + steps: + - uses: konradpabjan/move-labeled-or-milestoned-issue@219d384e03fa4b6460cd24f9f37d19eb033a4338 + with: + action-token: "${{ secrets.ELEMENT_BOT_TOKEN }}" + project-url: "https://github.com/orgs/vector-im/projects/6" + column-name: "📥 Inbox" + label-name: "A-Spaces" + - uses: octokit/graphql-action@v2.x + id: add_to_delight2 + with: + headers: '{"GraphQL-Features": "projects_next_graphql"}' + query: | + mutation add_to_project($projectid:String!,$contentid:String!) { + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { + projectNextItem { + id + } + } + } + projectid: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAM0swc1HvQ" + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + + move_voice-message_issues: + name: Move A-Voice Messages to Voice message board + runs-on: ubuntu-latest + if: > + contains(github.event.issue.labels.*.name, 'A-Voice Messages') + steps: + - uses: octokit/graphql-action@v2.x + with: + headers: '{"GraphQL-Features": "projects_next_graphql"}' + query: | + mutation add_to_project($projectid:String!,$contentid:String!) { + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { + projectNextItem { + id + } + } + } + projectid: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAM0swc2KCw" + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + + move_threads_issues: + name: Move A-Threads to Thread board + runs-on: ubuntu-latest + if: > + contains(github.event.issue.labels.*.name, 'A-Threads') + steps: + - uses: octokit/graphql-action@v2.x + with: + headers: '{"GraphQL-Features": "projects_next_graphql"}' + query: | + mutation add_to_project($projectid:String!,$contentid:String!) { + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { + projectNextItem { + id + } + } + } + projectid: ${{ env.PROJECT_ID }} + contentid: ${{ github.event.issue.node_id }} + env: + PROJECT_ID: "PN_kwDOAM0swc0rRA" + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} From eda34d6289ed7347bba9c2f71d630e4cdcd294cb Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 17 Nov 2021 16:01:10 +0000 Subject: [PATCH 31/34] changelog.d: Upgrade MatrixKit version ([v0.16.10](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.16.10)). --- Config/AppVersion.xcconfig | 4 ++-- Podfile | 2 +- changelog.d/x-nolink-0.change | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelog.d/x-nolink-0.change diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index 5e6c9928e..4b18e27d3 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -15,5 +15,5 @@ // // Version -MARKETING_VERSION = 1.6.7 -CURRENT_PROJECT_VERSION = 1.6.7 +MARKETING_VERSION = 1.6.8 +CURRENT_PROJECT_VERSION = 1.6.8 diff --git a/Podfile b/Podfile index f2fab251b..9c04e8912 100644 --- a/Podfile +++ b/Podfile @@ -13,7 +13,7 @@ use_frameworks! # - `{ {kit spec hash} => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for each 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 -$matrixKitVersion = '= 0.16.9' +$matrixKitVersion = '= 0.16.10' # $matrixKitVersion = :local # $matrixKitVersion = {'develop' => 'develop'} diff --git a/changelog.d/x-nolink-0.change b/changelog.d/x-nolink-0.change new file mode 100644 index 000000000..2ae535db8 --- /dev/null +++ b/changelog.d/x-nolink-0.change @@ -0,0 +1 @@ +Upgrade MatrixKit version ([v0.16.10](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.16.10)). \ No newline at end of file From e6720b0e48599fac5466301ba42cb17402c6fc38 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 17 Nov 2021 16:01:11 +0000 Subject: [PATCH 32/34] version++ --- CHANGES.md | 32 ++++++++++++++++++++++++++++++++ changelog.d/4384.change | 1 - changelog.d/4815.change | 1 - changelog.d/4976.change | 1 - changelog.d/4987.misc | 1 - changelog.d/5041.bugfix | 1 - changelog.d/5042.bugfix | 1 - changelog.d/5055.bugfix | 1 - changelog.d/5057.bugfix | 1 - changelog.d/5058.bugfix | 1 - changelog.d/5063.bugfix | 1 - changelog.d/5071.bugfix | 1 - changelog.d/5079.bugfix | 1 - changelog.d/5081.bugfix | 1 - changelog.d/5082.bugfix | 1 - changelog.d/5083.bugfix | 1 - changelog.d/5084.bugfix | 1 - changelog.d/5090.change | 1 - changelog.d/5105.bugfix | 1 - changelog.d/5129.change | 1 - changelog.d/x-nolink-0.change | 1 - 21 files changed, 32 insertions(+), 20 deletions(-) delete mode 100644 changelog.d/4384.change delete mode 100644 changelog.d/4815.change delete mode 100644 changelog.d/4976.change delete mode 100644 changelog.d/4987.misc delete mode 100644 changelog.d/5041.bugfix delete mode 100644 changelog.d/5042.bugfix delete mode 100644 changelog.d/5055.bugfix delete mode 100644 changelog.d/5057.bugfix delete mode 100644 changelog.d/5058.bugfix delete mode 100644 changelog.d/5063.bugfix delete mode 100644 changelog.d/5071.bugfix delete mode 100644 changelog.d/5079.bugfix delete mode 100644 changelog.d/5081.bugfix delete mode 100644 changelog.d/5082.bugfix delete mode 100644 changelog.d/5083.bugfix delete mode 100644 changelog.d/5084.bugfix delete mode 100644 changelog.d/5090.change delete mode 100644 changelog.d/5105.bugfix delete mode 100644 changelog.d/5129.change delete mode 100644 changelog.d/x-nolink-0.change diff --git a/CHANGES.md b/CHANGES.md index 966ee4efa..53518bf12 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,35 @@ +## Changes in 1.6.8 (2021-11-17) + +🙌 Improvements + +- Upgrade MatrixKit version ([v0.16.10](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.16.10)). +- Using mutable room list fetch sort options after chaning them to be a structure. ([#4384](https://github.com/vector-im/element-ios/issues/4384)) +- Share Extension: Remove the image compression prompt when the showMediaSizeSelection setting is disabled. ([#4815](https://github.com/vector-im/element-ios/issues/4815)) +- Replaced GrowingTextView with simpler, custom implementation. Cleaned up the RoomInputToolbar header. ([#4976](https://github.com/vector-im/element-ios/issues/4976)) +- Settings: Update about section footer text. ([#5090](https://github.com/vector-im/element-ios/issues/5090)) +- MXSession: Add logs to track if E2EE is enabled by default on the current HS. ([#5129](https://github.com/vector-im/element-ios/issues/5129)) + +🐛 Bugfixes + +- Fixed share extension and message forwarding room list accessory view icon. ([#5041](https://github.com/vector-im/element-ios/issues/5041)) +- Fixed message composer not following keyboard when swiping to dismiss. ([#5042](https://github.com/vector-im/element-ios/issues/5042)) +- RoomVC: Fix retain cycles that prevents `RoomViewController` to be deallocated. ([#5055](https://github.com/vector-im/element-ios/issues/5055)) +- Share Extension: Fix missing avatars and don't list spaces as rooms. ([#5057](https://github.com/vector-im/element-ios/issues/5057)) +- Fix retain cycles that prevents deallocation in several classes. ([#5058](https://github.com/vector-im/element-ios/issues/5058)) +- Fixed retain cycles between the user suggestion coordinator and the suggestion service, and in the suggestion service currentTextTrigger subject sink. ([#5063](https://github.com/vector-im/element-ios/issues/5063)) +- Ensure alerts with weak references are retained until they've been presented. ([#5071](https://github.com/vector-im/element-ios/issues/5071)) +- Message Composer: Ensure there is no text view when the user isn't allowed to send messages. ([#5079](https://github.com/vector-im/element-ios/issues/5079)) +- Home: Fix bug where favourited DM would be shown in both Favourites and People section. ([#5081](https://github.com/vector-im/element-ios/issues/5081)) +- Fix a crash when selected space is not home and a clear cache or logout is performed. ([#5082](https://github.com/vector-im/element-ios/issues/5082)) +- Room Previews: Fix room previews not loading. ([#5083](https://github.com/vector-im/element-ios/issues/5083)) +- Do not make the placeholder appearing when leaving a room on iPhone. ([#5084](https://github.com/vector-im/element-ios/issues/5084)) +- Fix room ordering when switching between Home and People/Rooms/Favourites. ([#5105](https://github.com/vector-im/element-ios/issues/5105)) + +Others + +- Improve wording around rageshakes in the defect issue template. ([#4987](https://github.com/vector-im/element-ios/issues/4987)) + + ## Changes in 1.6.6 (2021-10-21) ✨ Features diff --git a/changelog.d/4384.change b/changelog.d/4384.change deleted file mode 100644 index 9103529a3..000000000 --- a/changelog.d/4384.change +++ /dev/null @@ -1 +0,0 @@ -Using mutable room list fetch sort options after chaning them to be a structure. \ No newline at end of file diff --git a/changelog.d/4815.change b/changelog.d/4815.change deleted file mode 100644 index 757ff6d22..000000000 --- a/changelog.d/4815.change +++ /dev/null @@ -1 +0,0 @@ -Share Extension: Remove the image compression prompt when the showMediaSizeSelection setting is disabled. \ No newline at end of file diff --git a/changelog.d/4976.change b/changelog.d/4976.change deleted file mode 100644 index 7c52865d3..000000000 --- a/changelog.d/4976.change +++ /dev/null @@ -1 +0,0 @@ -Replaced GrowingTextView with simpler, custom implementation. Cleaned up the RoomInputToolbar header. \ No newline at end of file diff --git a/changelog.d/4987.misc b/changelog.d/4987.misc deleted file mode 100644 index ac7a294f3..000000000 --- a/changelog.d/4987.misc +++ /dev/null @@ -1 +0,0 @@ -Improve wording around rageshakes in the defect issue template. diff --git a/changelog.d/5041.bugfix b/changelog.d/5041.bugfix deleted file mode 100644 index 07882c073..000000000 --- a/changelog.d/5041.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed share extension and message forwarding room list accessory view icon. \ No newline at end of file diff --git a/changelog.d/5042.bugfix b/changelog.d/5042.bugfix deleted file mode 100644 index 481c4c053..000000000 --- a/changelog.d/5042.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed message composer not following keyboard when swiping to dismiss. \ No newline at end of file diff --git a/changelog.d/5055.bugfix b/changelog.d/5055.bugfix deleted file mode 100644 index a969f4fef..000000000 --- a/changelog.d/5055.bugfix +++ /dev/null @@ -1 +0,0 @@ -RoomVC: Fix retain cycles that prevents `RoomViewController` to be deallocated. \ No newline at end of file diff --git a/changelog.d/5057.bugfix b/changelog.d/5057.bugfix deleted file mode 100644 index b3f2b9744..000000000 --- a/changelog.d/5057.bugfix +++ /dev/null @@ -1 +0,0 @@ -Share Extension: Fix missing avatars and don't list spaces as rooms. \ No newline at end of file diff --git a/changelog.d/5058.bugfix b/changelog.d/5058.bugfix deleted file mode 100644 index 1e8112a36..000000000 --- a/changelog.d/5058.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix retain cycles that prevents deallocation in several classes. \ No newline at end of file diff --git a/changelog.d/5063.bugfix b/changelog.d/5063.bugfix deleted file mode 100644 index d1ee811c1..000000000 --- a/changelog.d/5063.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed retain cycles between the user suggestion coordinator and the suggestion service, and in the suggestion service currentTextTrigger subject sink. \ No newline at end of file diff --git a/changelog.d/5071.bugfix b/changelog.d/5071.bugfix deleted file mode 100644 index 40e26a7da..000000000 --- a/changelog.d/5071.bugfix +++ /dev/null @@ -1 +0,0 @@ -Ensure alerts with weak references are retained until they've been presented. \ No newline at end of file diff --git a/changelog.d/5079.bugfix b/changelog.d/5079.bugfix deleted file mode 100644 index 0f6b2baf8..000000000 --- a/changelog.d/5079.bugfix +++ /dev/null @@ -1 +0,0 @@ -Message Composer: Ensure there is no text view when the user isn't allowed to send messages. \ No newline at end of file diff --git a/changelog.d/5081.bugfix b/changelog.d/5081.bugfix deleted file mode 100644 index 545779610..000000000 --- a/changelog.d/5081.bugfix +++ /dev/null @@ -1 +0,0 @@ -Home: Fix bug where favourited DM would be shown in both Favourites and People section. \ No newline at end of file diff --git a/changelog.d/5082.bugfix b/changelog.d/5082.bugfix deleted file mode 100644 index e7d60ca36..000000000 --- a/changelog.d/5082.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix a crash when selected space is not home and a clear cache or logout is performed. \ No newline at end of file diff --git a/changelog.d/5083.bugfix b/changelog.d/5083.bugfix deleted file mode 100644 index 12a915cc6..000000000 --- a/changelog.d/5083.bugfix +++ /dev/null @@ -1 +0,0 @@ -Room Previews: Fix room previews not loading. \ No newline at end of file diff --git a/changelog.d/5084.bugfix b/changelog.d/5084.bugfix deleted file mode 100644 index c7826659d..000000000 --- a/changelog.d/5084.bugfix +++ /dev/null @@ -1 +0,0 @@ -Do not make the placeholder appearing when leaving a room on iPhone. \ No newline at end of file diff --git a/changelog.d/5090.change b/changelog.d/5090.change deleted file mode 100644 index c4d0c6cd2..000000000 --- a/changelog.d/5090.change +++ /dev/null @@ -1 +0,0 @@ -Settings: Update about section footer text. \ No newline at end of file diff --git a/changelog.d/5105.bugfix b/changelog.d/5105.bugfix deleted file mode 100644 index 4b833133a..000000000 --- a/changelog.d/5105.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix room ordering when switching between Home and People/Rooms/Favourites. \ No newline at end of file diff --git a/changelog.d/5129.change b/changelog.d/5129.change deleted file mode 100644 index 86738a989..000000000 --- a/changelog.d/5129.change +++ /dev/null @@ -1 +0,0 @@ -MXSession: Add logs to track if E2EE is enabled by default on the current HS. \ No newline at end of file diff --git a/changelog.d/x-nolink-0.change b/changelog.d/x-nolink-0.change deleted file mode 100644 index 2ae535db8..000000000 --- a/changelog.d/x-nolink-0.change +++ /dev/null @@ -1 +0,0 @@ -Upgrade MatrixKit version ([v0.16.10](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.16.10)). \ No newline at end of file From 53ed1da478a2b751abc689c4058b88310ff4eb20 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 17 Nov 2021 16:49:01 +0000 Subject: [PATCH 33/34] finish version++ --- Podfile.lock | 30 ++++++++----------- .../xcshareddata/xcschemes/Riot.xcscheme | 3 +- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 00be05819..b5a2aee51 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -43,7 +43,6 @@ PODS: - GBDeviceInfo (6.6.0): - GBDeviceInfo/Core (= 6.6.0) - GBDeviceInfo/Core (6.6.0) - - GrowingTextView (0.7.2) - GZIP (1.3.0) - HPGrowingTextView (1.1) - JitsiMeetSDK (3.10.2) @@ -59,29 +58,29 @@ PODS: - MatomoTracker (7.4.1): - MatomoTracker/Core (= 7.4.1) - MatomoTracker/Core (7.4.1) - - MatrixKit (0.16.9): + - MatrixKit (0.16.10): - Down (~> 0.11.0) - DTCoreText (~> 1.6.25) - HPGrowingTextView (~> 1.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixKit/Core (= 0.16.9) - - MatrixSDK (= 0.20.9) - - MatrixKit/Core (0.16.9): + - MatrixKit/Core (= 0.16.10) + - MatrixSDK (= 0.20.10) + - MatrixKit/Core (0.16.10): - Down (~> 0.11.0) - DTCoreText (~> 1.6.25) - HPGrowingTextView (~> 1.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixSDK (= 0.20.9) - - MatrixSDK (0.20.9): - - MatrixSDK/Core (= 0.20.9) - - MatrixSDK/Core (0.20.9): + - MatrixSDK (= 0.20.10) + - MatrixSDK (0.20.10): + - MatrixSDK/Core (= 0.20.10) + - MatrixSDK/Core (0.20.10): - 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.20.9): + - MatrixSDK/JingleCallStack (0.20.10): - JitsiMeetSDK (= 3.10.2) - MatrixSDK/Core - OLMKit (3.2.5): @@ -122,11 +121,10 @@ DEPENDENCIES: - FLEX (~> 4.5.0) - FlowCommoniOS (~> 1.12.0) - GBDeviceInfo (~> 6.6.0) - - GrowingTextView (~> 0.7.2) - KeychainAccess (~> 4.2.2) - KTCenterFlowLayout (~> 1.3.1) - MatomoTracker (~> 7.4.1) - - MatrixKit (= 0.16.9) + - MatrixKit (= 0.16.10) - MatrixSDK - MatrixSDK/JingleCallStack - OLMKit @@ -156,7 +154,6 @@ SPEC REPOS: - FLEX - FlowCommoniOS - GBDeviceInfo - - GrowingTextView - GZIP - HPGrowingTextView - JitsiMeetSDK @@ -198,7 +195,6 @@ SPEC CHECKSUMS: FLEX: e51461dd6f0bfb00643c262acdfea5d5d12c596b FlowCommoniOS: e9ecbc97fb9ce5c593fb3da0e1073b65a3902026 GBDeviceInfo: ed0db16230d2fa280e1cbb39a5a7f60f6946aaec - GrowingTextView: 876bf42005b5e4a4fd740597db12caaf41f0fe6c GZIP: 416858efbe66b41b206895ac6dfd5493200d95b3 HPGrowingTextView: 88a716d97fb853bcb08a4a08e4727da17efc9b19 JitsiMeetSDK: 2f118fa770f23e518f3560fc224fae3ac7062223 @@ -210,8 +206,8 @@ SPEC CHECKSUMS: LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d Logging: beeb016c9c80cf77042d62e83495816847ef108b MatomoTracker: 24a846c9d3aa76933183fe9d47fd62c9efa863fb - MatrixKit: ed209774b5c3408974c52cfe2aaba4d2e8b4b05b - MatrixSDK: 9e312e3874027bf9eab61be7d0779102f8bd323a + MatrixKit: c3f0bb056ceeb015e2f1688543ac4dbcf88bef2f + MatrixSDK: 0e2ed8fc6f004cac4b4ab46f038a86fe49ce4007 OLMKit: 9fb4799c4a044dd2c06bda31ec31a12191ad30b5 ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d Realm: b6027801398f3743fc222f096faa85281b506e6c @@ -226,6 +222,6 @@ SPEC CHECKSUMS: zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb -PODFILE CHECKSUM: 2740772a9b2d32e17876526875dfc58f67240ba0 +PODFILE CHECKSUM: 675c24e5fcaf580998f32fde709fc3be1b2bde22 COCOAPODS: 1.11.2 diff --git a/Riot.xcodeproj/xcshareddata/xcschemes/Riot.xcscheme b/Riot.xcodeproj/xcshareddata/xcschemes/Riot.xcscheme index 84ecb908a..a9bea1d96 100644 --- a/Riot.xcodeproj/xcshareddata/xcschemes/Riot.xcscheme +++ b/Riot.xcodeproj/xcshareddata/xcschemes/Riot.xcscheme @@ -4,7 +4,8 @@ version = "1.3"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> Date: Wed, 17 Nov 2021 18:00:36 +0000 Subject: [PATCH 34/34] Prepare for new sprint --- Config/AppVersion.xcconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index 4b18e27d3..d414d01ef 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -15,5 +15,5 @@ // // Version -MARKETING_VERSION = 1.6.8 -CURRENT_PROJECT_VERSION = 1.6.8 +MARKETING_VERSION = 1.6.9 +CURRENT_PROJECT_VERSION = 1.6.9