mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Add context menu item
This commit is contained in:
@@ -5922,6 +5922,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
return @[
|
||||
[self copyMenuItemWithEvent:event andCell:cell],
|
||||
[self replyMenuItemWithEvent:event],
|
||||
[self replyInThreadMenuItemWithEvent:event],
|
||||
[self editMenuItemWithEvent:event],
|
||||
[self moreMenuItemWithEvent:event andCell:cell]
|
||||
];
|
||||
@@ -5931,6 +5932,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
return @[
|
||||
[self copyMenuItemWithEvent:event andCell:cell],
|
||||
[self replyMenuItemWithEvent:event],
|
||||
[self replyInThreadMenuItemWithEvent:event],
|
||||
[self editMenuItemWithEvent:event]
|
||||
];
|
||||
}
|
||||
@@ -6232,6 +6234,23 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
return replyMenuItem;
|
||||
}
|
||||
|
||||
- (RoomContextualMenuItem *)replyInThreadMenuItemWithEvent:(MXEvent*)event
|
||||
{
|
||||
MXWeakify(self);
|
||||
|
||||
RoomContextualMenuItem *item = [[RoomContextualMenuItem alloc] initWithMenuAction:RoomContextualMenuActionReplyInThread];
|
||||
item.isEnabled = [self.roomDataSource canReplyToEventWithId:event.eventId] && !self.voiceMessageController.isRecordingAudio;
|
||||
item.action = ^{
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[self hideContextualMenuAnimated:YES cancelEventSelection:NO completion:nil];
|
||||
|
||||
// TODO: Implement starting a thread
|
||||
};
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
- (RoomContextualMenuItem *)moreMenuItemWithEvent:(MXEvent*)event andCell:(id<MXKCellRendering>)cell
|
||||
{
|
||||
MXWeakify(self);
|
||||
|
||||
Reference in New Issue
Block a user