fix(PrivacyView): [re-add] Fix relations between switch and line sensor
Fixes #4674 The part about profile image was already refactpred/fixed
This commit is contained in:
parent
723613a5e0
commit
5d0eb942b0
|
@ -8,7 +8,6 @@ QtObject {
|
|||
|
||||
// Module Properties
|
||||
property bool mnemonicBackedUp: privacyModule.mnemonicBackedUp
|
||||
property bool messagesFromContactsOnly: privacyModule.messagesFromContactsOnly
|
||||
|
||||
function getLinkPreviewWhitelist() {
|
||||
return root.privacyModule.getLinkPreviewWhitelist()
|
||||
|
|
|
@ -157,11 +157,16 @@ Item {
|
|||
StatusQControls.StatusSwitch {
|
||||
id: switch1
|
||||
checked: !localAccountSensitiveSettings.onlyShowContactsProfilePics
|
||||
onClicked: {
|
||||
onCheckedChanged: {
|
||||
if (localAccountSensitiveSettings.onlyShowContactsProfilePics === checked) {
|
||||
localAccountSensitiveSettings.onlyShowContactsProfilePics = !checked
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
sensor.onClicked: {
|
||||
switch1.checked = !switch1.checked
|
||||
}
|
||||
}
|
||||
|
||||
StatusListItem {
|
||||
|
@ -176,11 +181,16 @@ Item {
|
|||
StatusQControls.StatusSwitch {
|
||||
id: switch2
|
||||
checked: localAccountSensitiveSettings.displayChatImages
|
||||
onClicked: {
|
||||
onCheckedChanged: {
|
||||
if (localAccountSensitiveSettings.displayChatImages !== checked) {
|
||||
localAccountSensitiveSettings.displayChatImages = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
sensor.onClicked: {
|
||||
switch2.checked = !switch2.checked
|
||||
}
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -255,11 +265,18 @@ Item {
|
|||
components: [
|
||||
StatusQControls.StatusSwitch {
|
||||
id: switch3
|
||||
checked: !root.privacyStore.messagesFromContactsOnly
|
||||
checked: !root.privacyStore.privacyModule.messagesFromContactsOnly
|
||||
onCheckedChanged: {
|
||||
// messagesFromContactsOnly needs to be accessed from the module (view),
|
||||
// because otherwise doing `messagesFromContactsOnly = value` only changes the bool property on QML
|
||||
if (root.privacyStore.privacyModule.messagesFromContactsOnly === checked) {
|
||||
root.privacyStore.privacyModule.messagesFromContactsOnly = !checked
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
sensor.onClicked: {
|
||||
switch3.checked = root.privacyStore.messagesFromContactsOnly = !switch3.checked
|
||||
switch3.checked = !switch3.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue