Allow disabling notifications.
This commit is contained in:
parent
6d30e9d682
commit
d708c9aab6
|
@ -33,7 +33,7 @@ Rectangle {
|
|||
|
||||
connection: controller.connection
|
||||
|
||||
onNewMessage: if (!window.active) spectralController.postNotification(roomId, eventId, roomName, senderName, text, icon, iconPath)
|
||||
onNewMessage: if (!window.active && MSettings.showNotification) spectralController.postNotification(roomId, eventId, roomName, senderName, text, icon, iconPath)
|
||||
}
|
||||
|
||||
SortFilterProxyModel {
|
||||
|
@ -445,6 +445,13 @@ Rectangle {
|
|||
onCheckedChanged: MSettings.darkTheme = checked
|
||||
}
|
||||
|
||||
Switch {
|
||||
text: "Show notifications"
|
||||
checked: MSettings.showNotification
|
||||
|
||||
onCheckedChanged: MSettings.showNotification = checked
|
||||
}
|
||||
|
||||
Switch {
|
||||
text: "Use press and hold instead of right click"
|
||||
checked: MSettings.pressAndHold
|
||||
|
@ -459,13 +466,6 @@ Rectangle {
|
|||
onCheckedChanged: MSettings.showTray = checked
|
||||
}
|
||||
|
||||
Switch {
|
||||
text: "Confirm on Exit"
|
||||
checked: MSettings.confirmOnExit
|
||||
|
||||
onCheckedChanged: MSettings.confirmOnExit = checked
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@ import QtQuick 2.9
|
|||
import Qt.labs.settings 1.0
|
||||
|
||||
Settings {
|
||||
property bool showNotification: true
|
||||
|
||||
property bool pressAndHold
|
||||
property bool showTray: true
|
||||
property bool confirmOnExit: true
|
||||
|
||||
property bool darkTheme
|
||||
}
|
||||
|
|
|
@ -67,6 +67,11 @@ ApplicationWindow {
|
|||
onSyncDone: roomListForm.errorControl.visible = false
|
||||
}
|
||||
|
||||
Shortcut {
|
||||
sequence: StandardKey.Quit
|
||||
onActivated: Qt.quit()
|
||||
}
|
||||
|
||||
Dialog {
|
||||
property bool busy: false
|
||||
|
||||
|
|
Loading…
Reference in New Issue