feat: allow users to turn of notification sounds
This commit is contained in:
parent
3d0f50a5b3
commit
7577b3a2e6
|
@ -131,7 +131,10 @@ ScrollView {
|
||||||
|
|
||||||
StatusSwitch {
|
StatusSwitch {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
checked: true
|
checked: appSettings.notificationSoundsEnabled
|
||||||
|
onCheckedChanged: {
|
||||||
|
appSettings.notificationSoundsEnabled = this.checked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ ApplicationWindow {
|
||||||
audioRole: Audio.NotificationRole
|
audioRole: Audio.NotificationRole
|
||||||
source: "../../../../sounds/send_message.wav"
|
source: "../../../../sounds/send_message.wav"
|
||||||
volume: appSettings.volume
|
volume: appSettings.volume
|
||||||
|
muted: !appSettings.notificationSoundsEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
Audio {
|
Audio {
|
||||||
|
@ -61,6 +62,7 @@ ApplicationWindow {
|
||||||
audioRole: Audio.NotificationRole
|
audioRole: Audio.NotificationRole
|
||||||
source: "../../../../sounds/notification.wav"
|
source: "../../../../sounds/notification.wav"
|
||||||
volume: appSettings.volume
|
volume: appSettings.volume
|
||||||
|
muted: !appSettings.notificationSoundsEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
signal settingsLoaded()
|
signal settingsLoaded()
|
||||||
|
@ -77,6 +79,7 @@ ApplicationWindow {
|
||||||
property var recentEmojis: []
|
property var recentEmojis: []
|
||||||
property real volume: 0.2
|
property real volume: 0.2
|
||||||
property int notificationSetting: 0
|
property int notificationSetting: 0
|
||||||
|
property bool notificationSoundsEnabled: true
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: profileModel
|
target: profileModel
|
||||||
|
|
|
@ -54,6 +54,7 @@ Rectangle {
|
||||||
id: sendMessageSound
|
id: sendMessageSound
|
||||||
source: "../../sounds/send_message.wav"
|
source: "../../sounds/send_message.wav"
|
||||||
volume: appSettings.volume
|
volume: appSettings.volume
|
||||||
|
muted: !appSettings.notificationSoundsEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateExtraHeightFactor() {
|
function calculateExtraHeightFactor() {
|
||||||
|
|
|
@ -5,7 +5,8 @@ Audio {
|
||||||
id: errorSound
|
id: errorSound
|
||||||
source: "./error.mp3"
|
source: "./error.mp3"
|
||||||
audioRole: Audio.NotificationRole
|
audioRole: Audio.NotificationRole
|
||||||
volume: 0.2
|
volume: appSettings.volume
|
||||||
|
muted: !appSettings.notificationSoundsEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
/*##^##
|
/*##^##
|
||||||
|
|
Loading…
Reference in New Issue