Change Settings to singleton and add AutoMouseArea.

Also fixes acceptInvitation issue.
This commit is contained in:
Black Hat
2018-08-21 22:57:15 +08:00
parent fa4db065f2
commit e428e9f005
17 changed files with 104 additions and 48 deletions

View File

@@ -2,6 +2,7 @@ import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.2
import Matrique 0.1
import MatriqueSettings 0.1
Item {
readonly property bool hidden: marks === EventStatus.Redacted || marks === EventStatus.Hidden
@@ -21,15 +22,15 @@ Item {
anchors.right: !isState && sentByMe ? parent.right : undefined
anchors.horizontalCenter: isState ? parent.horizontalCenter : undefined
MouseArea {
AutoMouseArea {
anchors.fill: parent
onPressAndHold: Qt.createComponent("MessageContextMenu.qml").createObject(this)
onSecondaryClicked: Qt.createComponent("MessageContextMenu.qml").createObject(this)
}
Loader {
id: delegateLoader
asynchronous: setting.asyncMessageDelegate
asynchronous: MatriqueSettings.asyncMessageDelegate
source: {
if (eventType == "redaction" || hidden) return ""