Add missing copy menu item for messages, fixes #6036

This commit is contained in:
ismailgulek
2022-04-19 12:57:40 +03:00
parent 2a52318e5e
commit 1c359eef6c
+9 -4
View File
@@ -3485,9 +3485,7 @@ static CGSize kThreadListBarButtonItemImageSize;
MXWeakify(self);
BOOL showThreadOption = RiotSettings.shared.enableThreads
&& !self.roomDataSource.threadId
&& !selectedEvent.threadId;
BOOL showThreadOption = [self showThreadOptionForEvent:selectedEvent];
if (showThreadOption && [self canCopyEvent:selectedEvent andCell:cell])
{
[self.eventMenuBuilder addItemWithType:EventMenuItemTypeCopy
@@ -6417,7 +6415,7 @@ static CGSize kThreadListBarButtonItemImageSize;
BOOL showMoreOption = (event.isState && RiotSettings.shared.roomContextualMenuShowMoreOptionForStates)
|| (!event.isState && RiotSettings.shared.roomContextualMenuShowMoreOptionForMessages);
BOOL showThreadOption = !self.roomDataSource.threadId && !event.threadId;
BOOL showThreadOption = [self showThreadOptionForEvent:event];
NSMutableArray<RoomContextualMenuItem*> *items = [NSMutableArray arrayWithCapacity:5];
@@ -6808,6 +6806,13 @@ static CGSize kThreadListBarButtonItemImageSize;
#pragma mark - Threads
- (BOOL)showThreadOptionForEvent:(MXEvent*)event
{
return !self.roomDataSource.threadId
&& !event.threadId
&& (RiotSettings.shared.enableThreads || self.mainSession.store.supportedMatrixVersions.supportsThreads);
}
- (void)showThreadsNotice
{
if (!self.threadsNoticeModalPresenter)