Spectral/qml/menu/RoomContextMenu.qml

35 lines
761 B
QML
Raw Normal View History

import QtQuick 2.9
import QtQuick.Controls 2.2
Menu {
2018-09-11 05:14:56 +00:00
property var room: null
id: roomListMenu
MenuItem {
text: "Favourite"
checkable: true
2018-09-11 05:14:56 +00:00
checked: room && room.isFavourite
2018-09-04 13:13:14 +00:00
2018-09-11 05:14:56 +00:00
onTriggered: room.isFavourite ? room.removeTag("m.favourite") : room.addTag("m.favourite", "1")
}
MenuItem {
text: "Deprioritize"
checkable: true
2018-09-11 05:14:56 +00:00
checked: room && room.isLowPriority
2018-09-04 13:13:14 +00:00
2018-09-11 05:14:56 +00:00
onTriggered: room.isLowPriority ? room.removeTag("m.lowpriority") : room.addTag("m.lowpriority", "1")
}
MenuSeparator {}
MenuItem {
text: "Mark as Read"
2018-09-04 13:13:14 +00:00
2018-09-11 05:14:56 +00:00
onTriggered: room.markAllMessagesAsRead()
}
MenuItem {
text: "Leave Room"
2018-09-04 13:13:14 +00:00
2018-09-11 05:14:56 +00:00
onTriggered: room.forget()
}
}