Use modules.

This commit is contained in:
Black Hat
2018-10-01 16:07:48 +08:00
parent 0654a8b2b6
commit 385135a658
41 changed files with 158 additions and 89 deletions

View File

@@ -0,0 +1,35 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import Spectral 0.1
Menu {
property var model: null
id: roomListMenu
MenuItem {
text: "Favourite"
checkable: true
checked: model && model.category === RoomType.Favorite
onTriggered: model.category === RoomType.Favorite ? model.currentRoom.removeTag("m.favourite") : model.currentRoom.addTag("m.favourite", "1")
}
MenuItem {
text: "Deprioritize"
checkable: true
checked: model && model.category === RoomType.Deprioritized
onTriggered: model.category === RoomType.Deprioritized ? model.currentRoom.removeTag("m.lowpriority") : model.currentRoom.addTag("m.lowpriority", "1")
}
MenuSeparator {}
MenuItem {
text: "Mark as Read"
onTriggered: model.currentRoom.markAllMessagesAsRead()
}
MenuItem {
text: "Leave Room"
onTriggered: model.currentRoom.forget()
}
}