mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
@@ -34,13 +34,15 @@ class RoomActionProvider: RoomActionProviderProtocol {
|
||||
|
||||
var menu: UIMenu {
|
||||
if service.isRoomJoined {
|
||||
return UIMenu(children: [
|
||||
var children = service.hasUnread ? [self.markAsReadAction] : []
|
||||
children.append(contentsOf: [
|
||||
self.directChatAction,
|
||||
self.notificationsAction,
|
||||
self.favouriteAction,
|
||||
self.lowPriorityAction,
|
||||
self.leaveAction
|
||||
])
|
||||
return UIMenu(children: children)
|
||||
} else {
|
||||
if service.roomMembership == .invite {
|
||||
return UIMenu(children: [
|
||||
@@ -103,6 +105,15 @@ class RoomActionProvider: RoomActionProviderProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
private var markAsReadAction: UIAction {
|
||||
return UIAction(
|
||||
title: VectorL10n.homeContextMenuMarkAsRead,
|
||||
image: UIImage(systemName: "envelope.open")) { [weak self] action in
|
||||
guard let self = self else { return }
|
||||
self.service.markAsRead()
|
||||
}
|
||||
}
|
||||
|
||||
private var leaveAction: UIAction {
|
||||
let image = UIImage(systemName: "rectangle.righthalf.inset.fill.arrow.right")
|
||||
let action = UIAction(title: VectorL10n.homeContextMenuLeave, image: image) { [weak self] action in
|
||||
|
||||
Reference in New Issue
Block a user