refactor(@desktop/settings-advanced): hook to the toggled experimental features from the advanced tab added

This commit is contained in:
Sale Djenic 2021-12-24 09:24:26 +01:00 committed by Sale Djenic
parent 7ea85097df
commit a6b8fbe4b3
15 changed files with 184 additions and 73 deletions

View File

@ -0,0 +1,11 @@
from ../modules/shared_models/section_item import SectionType
import eventemitter
export SectionType
type
ToggleSectionArgs* = ref object of Args
sectionType*: SectionType
const TOGGLE_SECTION* = "toggleSection"

View File

@ -1,6 +1,6 @@
import ../shared_models/section_item, controller_interface, io_interface, chronicles import ../shared_models/section_item, controller_interface, io_interface, chronicles
import ../../global/global_singleton import ../../global/global_singleton
import ../../global/app_signals
import ../../../app_service/service/settings/service_interface as settings_service import ../../../app_service/service/settings/service_interface as settings_service
import ../../../app_service/service/keychain/service as keychain_service import ../../../app_service/service/keychain/service as keychain_service
import ../../../app_service/service/accounts/service_interface as accounts_service import ../../../app_service/service/accounts/service_interface as accounts_service
@ -87,16 +87,9 @@ method init*(self: Controller) =
self.messageService self.messageService
) )
self.events.on("sectionAvailabilityChanged") do(e:Args): self.events.on(TOGGLE_SECTION) do(e:Args):
## We will receive here a signal with two fields: let args = ToggleSectionArgs(e)
## sectionType: int self.delegate.toggleSection(args.sectionType)
## enabled: bool
##
## Then we only need to do something like:
## if(enabled):
## self.delegate.enableSection(sectionType)
## else:
## self.delegate.disableSection(sectionType)
discard discard
method getJoinedCommunities*(self: Controller): seq[CommunityDto] = method getJoinedCommunities*(self: Controller): seq[CommunityDto] =

View File

@ -2,6 +2,7 @@ import NimQml, Tables
import io_interface, view, controller, ../shared_models/section_item, ../shared_models/section_model import io_interface, view, controller, ../shared_models/section_item, ../shared_models/section_model
import ../../global/app_sections_config as conf import ../../global/app_sections_config as conf
import ../../global/app_signals
import ../../global/global_singleton import ../../global/global_singleton
import chat_section/module as chat_section_module import chat_section/module as chat_section_module
@ -415,11 +416,29 @@ method activeSectionSet*[T](self: Module[T], sectionId: string) =
self.notifySubModulesAboutChange(sectionId) self.notifySubModulesAboutChange(sectionId)
method enableSection*[T](self: Module[T], sectionType: SectionType) = proc setSectionAvailability[T](self: Module[T], sectionType: SectionType, available: bool) =
self.view.model().enableSection(sectionType) if(available):
self.view.model().enableSection(sectionType)
else:
self.view.model().disableSection(sectionType)
method disableSection*[T](self: Module[T], sectionType: SectionType) = method toggleSection*[T](self: Module[T], sectionType: SectionType) =
self.view.disableSection(sectionType) if (sectionType == SectionType.Wallet):
let enabled = singletonInstance.localAccountSensitiveSettings.getIsWalletEnabled()
self.setSectionAvailability(sectionType, not enabled)
singletonInstance.localAccountSensitiveSettings.setIsWalletEnabled(not enabled)
elif (sectionType == SectionType.Browser):
let enabled = singletonInstance.localAccountSensitiveSettings.getIsBrowserEnabled()
self.setSectionAvailability(sectionType, not enabled)
singletonInstance.localAccountSensitiveSettings.setIsBrowserEnabled(not enabled)
elif (sectionType == SectionType.Community):
let enabled = singletonInstance.localAccountSensitiveSettings.getCommunitiesEnabled()
self.setSectionAvailability(sectionType, not enabled)
singletonInstance.localAccountSensitiveSettings.setCommunitiesEnabled(not enabled)
elif (sectionType == SectionType.NodeManagement):
let enabled = singletonInstance.localAccountSensitiveSettings.getNodeManagementEnabled()
self.setSectionAvailability(sectionType, not enabled)
singletonInstance.localAccountSensitiveSettings.setNodeManagementEnabled(not enabled)
method setUserStatus*[T](self: Module[T], status: bool) = method setUserStatus*[T](self: Module[T], status: bool) =
self.controller.setUserStatus(status) self.controller.setUserStatus(status)

View File

@ -12,10 +12,7 @@ method emitStoringPasswordSuccess*(self: AccessInterface) {.base.} =
method activeSectionSet*(self: AccessInterface, sectionId: string) {.base.} = method activeSectionSet*(self: AccessInterface, sectionId: string) {.base.} =
raise newException(ValueError, "No implementation available") raise newException(ValueError, "No implementation available")
method enableSection*(self: AccessInterface, sectionType: SectionType) {.base.} = method toggleSection*(self: AccessInterface, sectionType: SectionType) {.base.} =
raise newException(ValueError, "No implementation available")
method disableSection*(self: AccessInterface, sectionType: SectionType) {.base.} =
raise newException(ValueError, "No implementation available") raise newException(ValueError, "No implementation available")
method communityJoined*(self: AccessInterface, community: CommunityDto, events: EventEmitter, method communityJoined*(self: AccessInterface, community: CommunityDto, events: EventEmitter,

View File

@ -3,9 +3,12 @@ import controller_interface
import io_interface import io_interface
import ../../../../core/fleets/fleet_configuration import ../../../../core/fleets/fleet_configuration
import ../../../../global/app_signals
import ../../../../../app_service/service/settings/service_interface as settings_service import ../../../../../app_service/service/settings/service_interface as settings_service
import ../../../../../app_service/service/node_configuration/service_interface as node_configuration_service import ../../../../../app_service/service/node_configuration/service_interface as node_configuration_service
import eventemitter
export controller_interface export controller_interface
logScope: logScope:
@ -14,13 +17,16 @@ logScope:
type type
Controller* = ref object of controller_interface.AccessInterface Controller* = ref object of controller_interface.AccessInterface
delegate: io_interface.AccessInterface delegate: io_interface.AccessInterface
events: EventEmitter
settingsService: settings_service.ServiceInterface settingsService: settings_service.ServiceInterface
nodeConfigurationService: node_configuration_service.ServiceInterface nodeConfigurationService: node_configuration_service.ServiceInterface
proc newController*(delegate: io_interface.AccessInterface, settingsService: settings_service.ServiceInterface, proc newController*(delegate: io_interface.AccessInterface, events: EventEmitter,
settingsService: settings_service.ServiceInterface,
nodeConfigurationService: node_configuration_service.ServiceInterface): Controller = nodeConfigurationService: node_configuration_service.ServiceInterface): Controller =
result = Controller() result = Controller()
result.delegate = delegate result.delegate = delegate
result.events = events
result.settingsService = settingsService result.settingsService = settingsService
result.nodeConfigurationService = nodeConfigurationService result.nodeConfigurationService = nodeConfigurationService
@ -146,4 +152,16 @@ method addCustomNetwork*(self: Controller, network: settings_service.Network) =
error "an error occurred, we couldn't add a custom network" error "an error occurred, we couldn't add a custom network"
return return
self.delegate.onCustomNetworkAdded(network) self.delegate.onCustomNetworkAdded(network)
method toggleWalletSection*(self: Controller) =
self.events.emit(TOGGLE_SECTION, ToggleSectionArgs(sectionType: SectionType.Wallet))
method toggleBrowserSection*(self: Controller) =
self.events.emit(TOGGLE_SECTION, ToggleSectionArgs(sectionType: SectionType.Browser))
method toggleCommunitySection*(self: Controller) =
self.events.emit(TOGGLE_SECTION, ToggleSectionArgs(sectionType: SectionType.Community))
method toggleNodeManagementSection*(self: Controller) =
self.events.emit(TOGGLE_SECTION, ToggleSectionArgs(sectionType: SectionType.NodeManagement))

View File

@ -56,4 +56,16 @@ method getCustomNetworks*(self: AccessInterface): seq[settings_service_type.Netw
raise newException(ValueError, "No implementation available") raise newException(ValueError, "No implementation available")
method addCustomNetwork*(self: AccessInterface, network: Network) {.base.} = method addCustomNetwork*(self: AccessInterface, network: Network) {.base.} =
raise newException(ValueError, "No implementation available") raise newException(ValueError, "No implementation available")
method toggleWalletSection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method toggleBrowserSection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method toggleCommunitySection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method toggleNodeManagementSection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")

View File

@ -8,6 +8,8 @@ import ../../../../global/global_singleton
import ../../../../../app_service/service/settings/service_interface as settings_service import ../../../../../app_service/service/settings/service_interface as settings_service
import ../../../../../app_service/service/node_configuration/service_interface as node_configuration_service import ../../../../../app_service/service/node_configuration/service_interface as node_configuration_service
import eventemitter
export io_interface export io_interface
logScope: logScope:
@ -21,13 +23,14 @@ type
controller: controller.AccessInterface controller: controller.AccessInterface
moduleLoaded: bool moduleLoaded: bool
proc newModule*(delegate: delegate_interface.AccessInterface, settingsService: settings_service.ServiceInterface, proc newModule*(delegate: delegate_interface.AccessInterface, events: EventEmitter,
settingsService: settings_service.ServiceInterface,
nodeConfigurationService: node_configuration_service.ServiceInterface): Module = nodeConfigurationService: node_configuration_service.ServiceInterface): Module =
result = Module() result = Module()
result.delegate = delegate result.delegate = delegate
result.view = view.newView(result) result.view = view.newView(result)
result.viewVariant = newQVariant(result.view) result.viewVariant = newQVariant(result.view)
result.controller = controller.newController(result, settingsService, nodeConfigurationService) result.controller = controller.newController(result, events, settingsService, nodeConfigurationService)
result.moduleLoaded = false result.moduleLoaded = false
method delete*(self: Module) = method delete*(self: Module) =
@ -139,4 +142,16 @@ method addCustomNetwork*(self: Module, name: string, endpoint: string, networkId
self.controller.addCustomNetwork(network) self.controller.addCustomNetwork(network)
method onCustomNetworkAdded*(self: Module, network: settings_service.Network) = method onCustomNetworkAdded*(self: Module, network: settings_service.Network) =
self.view.customNetworksModel().add(network.id, network.name) self.view.customNetworksModel().add(network.id, network.name)
method toggleWalletSection*(self: Module) =
self.controller.toggleWalletSection()
method toggleBrowserSection*(self: Module) =
self.controller.toggleBrowserSection()
method toggleCommunitySection*(self: Module) =
self.controller.toggleCommunitySection()
method toggleNodeManagementSection*(self: Module) =
self.controller.toggleNodeManagementSection()

View File

@ -51,4 +51,16 @@ method toggleDebug*(self: AccessInterface) {.base.} =
method addCustomNetwork*(self: AccessInterface, name: string, endpoint: string, networkId: int, networkType: string) method addCustomNetwork*(self: AccessInterface, name: string, endpoint: string, networkId: int, networkType: string)
{.slot.} = {.slot.} =
raise newException(ValueError, "No implementation available") raise newException(ValueError, "No implementation available")
method toggleWalletSection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method toggleBrowserSection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method toggleCommunitySection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method toggleNodeManagementSection*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")

View File

@ -140,4 +140,16 @@ QtObject:
notify = customNetworksModelChanged notify = customNetworksModelChanged
proc addCustomNetwork*(self: View, name: string, endpoint: string, networkId: int, networkType: string) {.slot.} = proc addCustomNetwork*(self: View, name: string, endpoint: string, networkId: int, networkType: string) {.slot.} =
self.delegate.addCustomNetwork(name, endpoint, networkId, networkType) self.delegate.addCustomNetwork(name, endpoint, networkId, networkType)
proc toggleWalletSection*(self: View) {.slot.} =
self.delegate.toggleWalletSection()
proc toggleBrowserSection*(self: View) {.slot.} =
self.delegate.toggleBrowserSection()
proc toggleCommunitySection*(self: View) {.slot.} =
self.delegate.toggleCommunitySection()
proc toggleNodeManagementSection*(self: View) {.slot.} =
self.delegate.toggleNodeManagementSection()

View File

@ -66,7 +66,7 @@ proc newModule*[T](delegate: T,
result.mnemonicModule = mnemonic_module.newModule(result, mnemonicService) result.mnemonicModule = mnemonic_module.newModule(result, mnemonicService)
result.privacyModule = privacy_module.newModule(result, privacyService, accountsService) result.privacyModule = privacy_module.newModule(result, privacyService, accountsService)
result.aboutModule = about_module.newModule(result, events, aboutService) result.aboutModule = about_module.newModule(result, events, aboutService)
result.advancedModule = advanced_module.newModule(result, settingsService, nodeConfigurationService) result.advancedModule = advanced_module.newModule(result, events, settingsService, nodeConfigurationService)
singletonInstance.engine.setRootContextProperty("profileSectionModule", result.viewVariant) singletonInstance.engine.setRootContextProperty("profileSectionModule", result.viewVariant)

View File

@ -90,16 +90,6 @@ QtObject:
let item = self.model.getItemBySectionType(sectionType.SectionType) let item = self.model.getItemBySectionType(sectionType.SectionType)
self.delegate.setActiveSection(item) self.delegate.setActiveSection(item)
proc enableSection*(self: View, sectionType: SectionType) =
# Since enable/disable section is possible only from the `Profile` tab, there is no need for setting
# `activeSection` in this moment, as it will be in any case set to `ProfileSettings` type.
self.model.enableSection(sectionType)
proc disableSection*(self: View, sectionType: SectionType) =
# Since enable/disable section is possible only from the `Profile` tab, there is no need for setting
# `activeSection` in this moment, as it will be in any case set to `ProfileSettings` type.
self.model.disableSection(sectionType)
proc setUserStatus*(self: View, status: bool) {.slot.} = proc setUserStatus*(self: View, status: bool) {.slot.} =
self.delegate.setUserStatus(status) self.delegate.setUserStatus(status)

View File

@ -143,6 +143,8 @@ QtObject:
self.items[i].active = true self.items[i].active = true
self.dataChanged(index, index, @[ModelRole.Active.int]) self.dataChanged(index, index, @[ModelRole.Active.int])
proc sectionVisibilityUpdated*(self: SectionModel) {.signal.}
proc enableDisableSection(self: SectionModel, sectionType: SectionType, value: bool) = proc enableDisableSection(self: SectionModel, sectionType: SectionType, value: bool) =
if(sectionType != SectionType.Community): if(sectionType != SectionType.Community):
for i in 0 ..< self.items.len: for i in 0 ..< self.items.len:
@ -165,6 +167,10 @@ QtObject:
let bottomIndex = self.createIndex(bottomInd, 0, nil) let bottomIndex = self.createIndex(bottomInd, 0, nil)
self.dataChanged(topIndex, bottomIndex, @[ModelRole.Enabled.int]) self.dataChanged(topIndex, bottomIndex, @[ModelRole.Enabled.int])
# This signal is emitted to update buttons visibility in the left navigation bar,
# `dataChanged` signal doesn't do the job because of `DelegateModel` used in `StatusAppNavBar` component
self.sectionVisibilityUpdated()
proc enableSection*(self: SectionModel, sectionType: SectionType) = proc enableSection*(self: SectionModel, sectionType: SectionType) =
self.enableDisableSection(sectionType, true) self.enableDisableSection(sectionType, true)

View File

@ -21,6 +21,17 @@ QtObject {
property bool isWakuV2: root.fleet === Constants.waku_prod || property bool isWakuV2: root.fleet === Constants.waku_prod ||
root.fleet === Constants.waku_test root.fleet === Constants.waku_test
readonly property QtObject experimentalFeatures: QtObject {
readonly property string wallet: "wallet"
readonly property string browser: "browser"
readonly property string communities: "communities"
readonly property string activityCenter: "activityCenter"
readonly property string nodeManagement: "nodeManagement"
readonly property string onlineUsers: "onlineUsers"
readonly property string gifWidget: "gifWidget"
readonly property string keycard: "keycard"
}
function logDir() { function logDir() {
return root.advancedModule.logDir() return root.advancedModule.logDir()
} }
@ -56,4 +67,31 @@ QtObject {
function addCustomNetwork(name, endpoint, networkId, networkType) { function addCustomNetwork(name, endpoint, networkId, networkType) {
root.advancedModule.addCustomNetwork(name, endpoint, networkId, networkType) root.advancedModule.addCustomNetwork(name, endpoint, networkId, networkType)
} }
function toggleExperimentalFeature(feature) {
if (feature === experimentalFeatures.wallet) {
advancedModule.toggleWalletSection()
}
else if (feature === experimentalFeatures.browser) {
advancedModule.toggleBrowserSection()
}
else if (feature === experimentalFeatures.communities) {
advancedModule.toggleCommunitySection()
}
else if (feature === experimentalFeatures.activityCenter) {
localAccountSensitiveSettings.isActivityCenterEnabled = !localAccountSensitiveSettings.isActivityCenterEnabled
}
else if (feature === experimentalFeatures.nodeManagement) {
advancedModule.toggleNodeManagementSection()
}
else if (feature === experimentalFeatures.onlineUsers) {
localAccountSensitiveSettings.showOnlineUsers = !localAccountSensitiveSettings.showOnlineUsers
}
else if (feature === experimentalFeatures.gifWidget) {
localAccountSensitiveSettings.isGifWidgetEnabled = !localAccountSensitiveSettings.isGifWidgetEnabled
}
else if (feature === experimentalFeatures.keycard) {
localAccountSettings.isKeycardEnabled = !localAccountSettings.isKeycardEnabled
}
}
} }

View File

@ -16,8 +16,6 @@ import "../panels"
ScrollView { ScrollView {
id: root id: root
property bool isWakuV2: store.fleet == Constants.waku_prod || store.fleet === Constants.waku_test
property var store
property int profileContentWidth property int profileContentWidth
height: parent.height height: parent.height
@ -116,25 +114,10 @@ ScrollView {
switchChecked: localAccountSensitiveSettings.isWalletEnabled switchChecked: localAccountSensitiveSettings.isWalletEnabled
onClicked: { onClicked: {
if (!localAccountSensitiveSettings.isWalletEnabled) { if (!localAccountSensitiveSettings.isWalletEnabled) {
confirmationPopup.settingsProp = "isWalletEnabled" confirmationPopup.experimentalFeature = root.advancedStore.experimentalFeatures.wallet
confirmationPopup.open() confirmationPopup.open()
} else { } else {
localAccountSensitiveSettings.isWalletEnabled = false root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.wallet)
}
}
}
// TODO: replace with StatusQ component
StatusSettingsLineButton {
text: qsTr("Wallet v2 - do not use, under active development")
isSwitch: true
switchChecked: localAccountSensitiveSettings.isWalletV2Enabled
onClicked: {
if (!localAccountSensitiveSettings.isWalletV2Enabled) {
confirmationPopup.settingsProp = "isWalletV2Enabled"
confirmationPopup.open()
} else {
localAccountSensitiveSettings.isWalletV2Enabled = false
} }
} }
} }
@ -147,10 +130,10 @@ ScrollView {
switchChecked: localAccountSensitiveSettings.isBrowserEnabled switchChecked: localAccountSensitiveSettings.isBrowserEnabled
onClicked: { onClicked: {
if (!localAccountSensitiveSettings.isBrowserEnabled) { if (!localAccountSensitiveSettings.isBrowserEnabled) {
confirmationPopup.settingsProp = "isBrowserEnabled" confirmationPopup.experimentalFeature = root.advancedStore.experimentalFeatures.browser
confirmationPopup.open() confirmationPopup.open()
} else { } else {
localAccountSensitiveSettings.isBrowserEnabled = false root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.browser)
} }
} }
} }
@ -163,10 +146,10 @@ ScrollView {
switchChecked: localAccountSensitiveSettings.communitiesEnabled switchChecked: localAccountSensitiveSettings.communitiesEnabled
onClicked: { onClicked: {
if (!localAccountSensitiveSettings.communitiesEnabled) { if (!localAccountSensitiveSettings.communitiesEnabled) {
confirmationPopup.settingsProp = "communitiesEnabled" confirmationPopup.experimentalFeature = root.advancedStore.experimentalFeatures.communities
confirmationPopup.open() confirmationPopup.open()
} else { } else {
localAccountSensitiveSettings.communitiesEnabled = false root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.communities)
} }
} }
} }
@ -179,10 +162,10 @@ ScrollView {
switchChecked: localAccountSensitiveSettings.isActivityCenterEnabled switchChecked: localAccountSensitiveSettings.isActivityCenterEnabled
onClicked: { onClicked: {
if (!localAccountSensitiveSettings.isActivityCenterEnabled) { if (!localAccountSensitiveSettings.isActivityCenterEnabled) {
confirmationPopup.settingsProp = "isActivityCenterEnabled" confirmationPopup.experimentalFeature = root.advancedStore.experimentalFeatures.activityCenter
confirmationPopup.open() confirmationPopup.open()
} else { } else {
localAccountSensitiveSettings.isActivityCenterEnabled = false root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.activityCenter)
} }
} }
} }
@ -195,10 +178,10 @@ ScrollView {
switchChecked: localAccountSensitiveSettings.nodeManagementEnabled switchChecked: localAccountSensitiveSettings.nodeManagementEnabled
onClicked: { onClicked: {
if (!localAccountSensitiveSettings.nodeManagementEnabled) { if (!localAccountSensitiveSettings.nodeManagementEnabled) {
confirmationPopup.settingsProp = "nodeManagementEnabled" confirmationPopup.experimentalFeature = root.advancedStore.experimentalFeatures.nodeManagement
confirmationPopup.open() confirmationPopup.open()
} else { } else {
localAccountSensitiveSettings.nodeManagementEnabled = false root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.nodeManagement)
} }
} }
} }
@ -211,7 +194,7 @@ ScrollView {
isSwitch: true isSwitch: true
switchChecked: localAccountSensitiveSettings.showOnlineUsers switchChecked: localAccountSensitiveSettings.showOnlineUsers
onClicked: { onClicked: {
localAccountSensitiveSettings.showOnlineUsers = !localAccountSensitiveSettings.showOnlineUsers root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.onlineUsers)
} }
} }
@ -222,7 +205,7 @@ ScrollView {
isSwitch: true isSwitch: true
switchChecked: localAccountSensitiveSettings.isGifWidgetEnabled switchChecked: localAccountSensitiveSettings.isGifWidgetEnabled
onClicked: { onClicked: {
localAccountSensitiveSettings.isGifWidgetEnabled = !localAccountSensitiveSettings.isGifWidgetEnabled root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.gifWidget)
} }
} }
@ -233,7 +216,7 @@ ScrollView {
isSwitch: true isSwitch: true
switchChecked: localAccountSettings.isKeycardEnabled switchChecked: localAccountSettings.isKeycardEnabled
onClicked: { onClicked: {
localAccountSettings.isKeycardEnabled = !localAccountSettings.isKeycardEnabled root.advancedStore.toggleExperimentalFeature(root.advancedStore.experimentalFeatures.keycard)
} }
} }
@ -510,16 +493,15 @@ ScrollView {
ConfirmationDialog { ConfirmationDialog {
id: confirmationPopup id: confirmationPopup
property string settingsProp: "" property string experimentalFeature: ""
showCancelButton: true showCancelButton: true
//% "This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk." //% "This feature is experimental and is meant for testing purposes by core contributors and the community. It's not meant for real use and makes no claims of security or integrity of funds or data. Use at your own risk."
confirmationText: (settingsProp === "isWalletV2Enabled" ? qsTr("<b>--DO NOT USE - UNDER ACTIVE DEVELOPMENT--</b>\n") : "") + confirmationText: qsTrId("this-feature-is-experimental-and-is-meant-for-testing-purposes-by-core-contributors-and-the-community--it-s-not-meant-for-real-use-and-makes-no-claims-of-security-or-integrity-of-funds-or-data--use-at-your-own-risk-")
qsTrId("this-feature-is-experimental-and-is-meant-for-testing-purposes-by-core-contributors-and-the-community--it-s-not-meant-for-real-use-and-makes-no-claims-of-security-or-integrity-of-funds-or-data--use-at-your-own-risk-")
//% "I understand" //% "I understand"
confirmButtonLabel: qsTrId("i-understand") confirmButtonLabel: qsTrId("i-understand")
onConfirmButtonClicked: { onConfirmButtonClicked: {
localAccountSensitiveSettings[settingsProp] = true root.advancedStore.toggleExperimentalFeature(experimentalFeature)
settingsProp = "" experimentalFeature = ""
close() close()
} }

View File

@ -176,6 +176,12 @@ Item {
communityTypeValue: Constants.appSection.community communityTypeValue: Constants.appSection.community
sectionModel: mainModule.sectionsModel sectionModel: mainModule.sectionsModel
Component.onCompleted: {
mainModule.sectionsModel.sectionVisibilityUpdated.connect(function(){
triggerUpdate()
})
}
property bool communityAdded: false property bool communityAdded: false
onAboutToUpdateFilteredRegularModel: { onAboutToUpdateFilteredRegularModel: {