Fix notification issue.
This commit is contained in:
@@ -4,6 +4,8 @@ import QtQuick.Controls.Material 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import Matrique 0.1
|
||||
|
||||
import "qrc:/js/util.js" as Util
|
||||
|
||||
Drawer {
|
||||
property var room
|
||||
|
||||
@@ -94,6 +96,10 @@ Drawer {
|
||||
|
||||
boundsBehavior: Flickable.DragOverBounds
|
||||
|
||||
model: UserListModel {
|
||||
room: roomDrawer.room
|
||||
}
|
||||
|
||||
delegate: ItemDelegate {
|
||||
width: parent.width
|
||||
height: 48
|
||||
@@ -107,6 +113,7 @@ Drawer {
|
||||
Layout.preferredWidth: height
|
||||
Layout.fillHeight: true
|
||||
|
||||
defaultColor: Util.stringToColor(name)
|
||||
image: avatar
|
||||
hint: name
|
||||
}
|
||||
@@ -119,12 +126,6 @@ Drawer {
|
||||
}
|
||||
}
|
||||
|
||||
model: UserListModel {
|
||||
id: userListModel
|
||||
|
||||
room: roomDrawer.room
|
||||
}
|
||||
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
|
||||
import "qrc:/js/util.js" as Util
|
||||
|
||||
ItemDelegate {
|
||||
property var page
|
||||
readonly property bool selected: stackView.currentItem === page
|
||||
@@ -18,14 +20,5 @@ ItemDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if(page && stackView.currentItem !== page) {
|
||||
if(stackView.depth === 1) {
|
||||
stackView.replace(page)
|
||||
} else {
|
||||
stackView.clear()
|
||||
stackView.push(page)
|
||||
}
|
||||
}
|
||||
}
|
||||
onClicked: Util.pushToStack(stackView, page)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user