2018-08-24 05:25:41 +00:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.2
|
2018-09-17 13:01:02 +00:00
|
|
|
import Spectral 0.1
|
2018-08-24 05:25:41 +00:00
|
|
|
|
|
|
|
Menu {
|
2018-09-12 00:27:34 +00:00
|
|
|
property var model: null
|
2018-09-11 05:14:56 +00:00
|
|
|
|
2018-08-24 05:25:41 +00:00
|
|
|
id: roomListMenu
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
text: "Favourite"
|
|
|
|
checkable: true
|
2018-09-12 00:27:34 +00:00
|
|
|
checked: model && model.category === RoomType.Favorite
|
2018-09-04 13:13:14 +00:00
|
|
|
|
2018-09-12 00:27:34 +00:00
|
|
|
onTriggered: model.category === RoomType.Favorite ? model.currentRoom.removeTag("m.favourite") : model.currentRoom.addTag("m.favourite", "1")
|
2018-08-24 05:25:41 +00:00
|
|
|
}
|
|
|
|
MenuItem {
|
|
|
|
text: "Deprioritize"
|
|
|
|
checkable: true
|
2018-09-12 00:27:34 +00:00
|
|
|
checked: model && model.category === RoomType.Deprioritized
|
2018-09-04 13:13:14 +00:00
|
|
|
|
2018-09-12 00:27:34 +00:00
|
|
|
onTriggered: model.category === RoomType.Deprioritized ? model.currentRoom.removeTag("m.lowpriority") : model.currentRoom.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-12 00:27:34 +00:00
|
|
|
onTriggered: model.currentRoom.markAllMessagesAsRead()
|
2018-08-24 05:25:41 +00:00
|
|
|
}
|
|
|
|
MenuItem {
|
|
|
|
text: "Leave Room"
|
2018-09-04 13:13:14 +00:00
|
|
|
|
2018-09-12 00:27:34 +00:00
|
|
|
onTriggered: model.currentRoom.forget()
|
2018-08-24 05:25:41 +00:00
|
|
|
}
|
|
|
|
}
|