status-desktop/ui/app/AppLayouts/Profile/stores/MessagingStore.qml

45 lines
1.2 KiB
QML
Raw Normal View History

import QtQuick 2.13
import utils 1.0
QtObject {
id: root
property var privacyModule
property var syncModule
property var wakuModule
property var mailservers: syncModule.model
property var wakunodes: wakuModule.model
property bool useMailservers: syncModule.useMailservers
function toggleUseMailservers(value) {
root.syncModule.useMailservers = value
}
// Module Properties
property bool automaticMailserverSelection: syncModule.automaticSelection
property string activeMailserverId: syncModule.activeMailserverId
property string pinnedMailserverId: syncModule.pinnedMailserverId
function setPinnedMailserverId(mailserverID) {
root.syncModule.setPinnedMailserverId(mailserverID)
}
function saveNewMailserver(name, nodeAddress) {
root.syncModule.saveNewMailserver(name, nodeAddress)
}
function saveNewWakuNode(nodeAddress) {
root.wakuModule.saveNewWakuNode(nodeAddress)
}
function enableAutomaticMailserverSelection(checked) {
if (automaticMailserverSelection === checked) {
return
}
root.syncModule.enableAutomaticSelection(checked)
}
}