2018-08-24 05:25:41 +00:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
|
|
|
|
Menu {
|
2018-09-11 05:14:56 +00:00
|
|
|
property var room: null
|
|
|
|
|
2018-08-24 05:25:41 +00:00
|
|
|
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")
|
2018-08-24 05:25:41 +00:00
|
|
|
}
|
|
|
|
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")
|
2018-08-24 05:25:41 +00:00
|
|
|
}
|
|
|
|
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()
|
2018-08-24 05:25:41 +00:00
|
|
|
}
|
|
|
|
MenuItem {
|
|
|
|
text: "Leave Room"
|
2018-09-04 13:13:14 +00:00
|
|
|
|
2018-09-11 05:14:56 +00:00
|
|
|
onTriggered: room.forget()
|
2018-08-24 05:25:41 +00:00
|
|
|
}
|
|
|
|
}
|