Update libqmatrixclient && add prioritize/deprioritize.
This commit is contained in:
parent
be5332770a
commit
845b0114bd
|
@ -1 +1 @@
|
|||
Subproject commit 716aa2a97d6654cc45ed6a9c8b08cad6d833e301
|
||||
Subproject commit cbb8c1bf4e33639d8a00341021542de99bd6bce2
|
|
@ -13,7 +13,7 @@ Page {
|
|||
RoomListModel {
|
||||
id: roomListModel
|
||||
|
||||
connection: matriqueController.isLogin ? page.connection : undefined
|
||||
connection: page.connection
|
||||
|
||||
onNewMessage: trayIcon.showMessage("New message", "New message for room " + room.displayName)
|
||||
}
|
||||
|
|
|
@ -210,18 +210,12 @@ Item {
|
|||
id: roomListMenu
|
||||
|
||||
MenuItem {
|
||||
text: "Priorize"
|
||||
onTriggered: {
|
||||
roomListMenu.room.removeTag("m.lowpriority")
|
||||
roomListMenu.room.addTag("m.favourite", "")
|
||||
}
|
||||
text: "Prioritize"
|
||||
onTriggered: roomListMenu.room.isFavourite ? roomListMenu.room.removeTag("m.favourite") : roomListMenu.room.addTag("m.favourite", "1")
|
||||
}
|
||||
MenuItem {
|
||||
text: "Depriorize"
|
||||
onTriggered: {
|
||||
roomListMenu.room.removeTag("m.favourite")
|
||||
roomListMenu.room.addTag("m.lowpriority", "")
|
||||
}
|
||||
text: "Deprioritize"
|
||||
onTriggered: roomListMenu.room.isLowPriority ? roomListMenu.room.removeTag("m.lowpriority") : roomListMenu.room.addTag("m.lowpriority", "1")
|
||||
}
|
||||
MenuItem {
|
||||
text: "Direct Chat"
|
||||
|
|
|
@ -15,8 +15,8 @@ Page {
|
|||
Layout.preferredWidth: height
|
||||
Layout.fillHeight: true
|
||||
|
||||
source: connection ? connection.localUser && connection.localUser.avatarUrl ? "image://mxc/" + connection.localUser.avatarUrl : "" : "qrc:/asset/img/avatar.png"
|
||||
displayText: connection && connection.localUser.displayName ? connection.localUser.displayName : "N"
|
||||
source: matriqueController.isLogin ? connection.localUser && connection.localUser.avatarUrl ? "image://mxc/" + connection.localUser.avatarUrl : "" : "qrc:/asset/img/avatar.png"
|
||||
displayText: matriqueController.isLogin && connection.localUser.displayName ? connection.localUser.displayName : "N"
|
||||
opaqueBackground: false
|
||||
}
|
||||
|
||||
|
@ -26,12 +26,12 @@ Page {
|
|||
|
||||
Label {
|
||||
font.pointSize: 18
|
||||
text: connection ? connection.localUser.displayName : ""
|
||||
text: matriqueController.isLogin ? connection.localUser.displayName : ""
|
||||
}
|
||||
|
||||
Label {
|
||||
font.pointSize: 12
|
||||
text: connection ? connection.localUser.id : ""
|
||||
text: matriqueController.isLogin ? connection.localUser.id : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,8 +153,8 @@ ApplicationWindow {
|
|||
anchors.fill: parent
|
||||
anchors.margins: 15
|
||||
|
||||
source: connection ? connection.localUser && connection.localUser.avatarUrl ? "image://mxc/" + connection.localUser.avatarUrl : "" : "qrc:/asset/img/avatar.png"
|
||||
displayText: connection && connection.localUser.displayName ? connection.localUser.displayName : "N"
|
||||
source: matriqueController.isLogin ? connection.localUser && connection.localUser.avatarUrl ? "image://mxc/" + connection.localUser.avatarUrl : "" : "qrc:/asset/img/avatar.png"
|
||||
displayText: matriqueController.isLogin && connection.localUser.displayName ? connection.localUser.displayName : "N"
|
||||
opaqueBackground: false
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ void RoomListModel::connectRoomSignals(QMatrixClient::Room* room) {
|
|||
[=] { unreadMessagesChanged(room); });
|
||||
connect(room, &QMatrixClient::Room::notificationCountChanged, this,
|
||||
[=] { unreadMessagesChanged(room); });
|
||||
connect(room, &QMatrixClient::Room::tagsChanged, this,
|
||||
[=] { refresh(room); });
|
||||
connect(room, &QMatrixClient::Room::joinStateChanged, this,
|
||||
[=] { refresh(room); });
|
||||
connect(room, &QMatrixClient::Room::avatarChanged, this,
|
||||
|
|
Loading…
Reference in New Issue