Merge branch 'ismail/5117_thread_message_actions' into ismail/5092_thread_list

This commit is contained in:
ismailgulek
2021-11-19 14:46:51 +03:00
5 changed files with 77 additions and 114 deletions
+15 -24
View File
@@ -3284,6 +3284,20 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
}]];
}
if (self.roomDataSource.threadId && [selectedEvent.eventId isEqualToString:self.roomDataSource.threadId])
{
// if in the thread and selected event is the root event
// add "View in room" action
[actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewInRoom]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
[self.delegate roomViewController:self
showRoomWithId:self.roomDataSource.roomId
eventId:selectedEvent.eventId];
}]];
}
if (selectedEvent.sentState == MXEventSentStateSent) {
[actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward]
style:UIAlertActionStyleDefault
@@ -3293,20 +3307,6 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
}]];
}
if (self.roomDataSource.threadId && [selectedEvent.eventId isEqualToString:self.roomDataSource.threadId])
{
// if in the thread and selected event is the root event
// add "View in room" action
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionViewInRoom]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
[self.delegate roomViewController:self
showRoomWithId:self.roomDataSource.roomId
eventId:selectedEvent.eventId];
}]];
}
if (!isJitsiCallEvent)
{
[actionsMenu addAction:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionQuote]
@@ -4661,15 +4661,6 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
{
[self declineRoomInvitation];
}
else if ([titleView isKindOfClass:ThreadRoomTitleView.class])
{
ThreadRoomTitleView *threadTitleView = (ThreadRoomTitleView *)titleView;
if (tappedView == threadTitleView.closeButton)
{
// dismiss self
[self dismissViewControllerAnimated:YES completion:nil];
}
}
}
- (void)declineRoomInvitation
@@ -6363,7 +6354,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
previewData:nil];
self.threadBridgePresenter = [[RoomCoordinatorBridgePresenter alloc] initWithParameters:parameters];
self.threadBridgePresenter.delegate = self;
[self.threadBridgePresenter presentFrom:self animated:YES];
[self.threadBridgePresenter pushFrom:self.navigationController animated:YES];
}
#pragma mark - RoomContextualMenuViewControllerDelegate