feat: allow users to turn of notification sounds

This commit is contained in:
Pascal Precht 2020-10-15 17:04:53 +02:00 committed by Iuri Matias
parent 3d0f50a5b3
commit 7577b3a2e6
4 changed files with 10 additions and 2 deletions

View File

@ -131,7 +131,10 @@ ScrollView {
StatusSwitch {
Layout.alignment: Qt.AlignRight
checked: true
checked: appSettings.notificationSoundsEnabled
onCheckedChanged: {
appSettings.notificationSoundsEnabled = this.checked
}
}
}

View File

@ -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

View File

@ -54,6 +54,7 @@ Rectangle {
id: sendMessageSound
source: "../../sounds/send_message.wav"
volume: appSettings.volume
muted: !appSettings.notificationSoundsEnabled
}
function calculateExtraHeightFactor() {

View File

@ -5,7 +5,8 @@ Audio {
id: errorSound
source: "./error.mp3"
audioRole: Audio.NotificationRole
volume: 0.2
volume: appSettings.volume
muted: !appSettings.notificationSoundsEnabled
}
/*##^##