Skip to content

Commit c6c2596

Browse files
committed
Add missing copy menu item for messages, fixes #6036
1 parent c3d7d1e commit c6c2596

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Riot/Modules/Room/RoomViewController.m

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,9 +3485,7 @@ - (void)showAdditionalActionsMenuForEvent:(MXEvent*)selectedEvent inCell:(id<MXK
34853485

34863486
MXWeakify(self);
34873487

3488-
BOOL showThreadOption = RiotSettings.shared.enableThreads
3489-
&& !self.roomDataSource.threadId
3490-
&& !selectedEvent.threadId;
3488+
BOOL showThreadOption = [self showThreadOptionForEvent:selectedEvent];
34913489
if (showThreadOption && [self canCopyEvent:selectedEvent andCell:cell])
34923490
{
34933491
[self.eventMenuBuilder addItemWithType:EventMenuItemTypeCopy
@@ -6417,7 +6415,7 @@ - (void)removeMXSessionStateChangeNotificationsListener
64176415

64186416
BOOL showMoreOption = (event.isState && RiotSettings.shared.roomContextualMenuShowMoreOptionForStates)
64196417
|| (!event.isState && RiotSettings.shared.roomContextualMenuShowMoreOptionForMessages);
6420-
BOOL showThreadOption = !self.roomDataSource.threadId && !event.threadId;
6418+
BOOL showThreadOption = [self showThreadOptionForEvent:event];
64216419

64226420
NSMutableArray<RoomContextualMenuItem*> *items = [NSMutableArray arrayWithCapacity:5];
64236421

@@ -6808,6 +6806,13 @@ - (RoomContextualMenuItem *)moreMenuItemWithEvent:(MXEvent*)event andCell:(id<MX
68086806

68096807
#pragma mark - Threads
68106808

6809+
- (BOOL)showThreadOptionForEvent:(MXEvent*)event
6810+
{
6811+
return !self.roomDataSource.threadId
6812+
&& !event.threadId
6813+
&& (RiotSettings.shared.enableThreads || self.mainSession.store.supportedMatrixVersions.supportsThreads);
6814+
}
6815+
68116816
- (void)showThreadsNotice
68126817
{
68136818
if (!self.threadsNoticeModalPresenter)

0 commit comments

Comments
 (0)