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