diff --git a/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml b/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml index 96dda364d6..17a96cb275 100644 --- a/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml +++ b/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml @@ -27,6 +27,7 @@ QtObject { root.fleet === Constants.status_prod readonly property bool isFakeLoadingScreenEnabled: localAppSettings.fakeLoadingScreenEnabled ?? false + property bool isManageCommunityOnTestModeEnabled: false readonly property QtObject experimentalFeatures: QtObject { readonly property string browser: "browser" readonly property string communities: "communities" @@ -155,6 +156,10 @@ QtObject { localAppSettings.fakeLoadingScreenEnabled = !localAppSettings.fakeLoadingScreenEnabled } + function toggleManageCommunityOnTestnet() { + root.isManageCommunityOnTestModeEnabled = !root.isManageCommunityOnTestModeEnabled + } + function toggleWakuV2ShardedCommunities() { if(!localAppSettings) return diff --git a/ui/app/AppLayouts/Profile/views/AdvancedView.qml b/ui/app/AppLayouts/Profile/views/AdvancedView.qml index fae0785618..110db1e5d5 100644 --- a/ui/app/AppLayouts/Profile/views/AdvancedView.qml +++ b/ui/app/AppLayouts/Profile/views/AdvancedView.qml @@ -445,6 +445,17 @@ SettingsContentBase { } } + StatusSettingsLineButton { + anchors.leftMargin: 0 + anchors.rightMargin: 0 + text: qsTr("Manage communities on testnet") + isSwitch: true + switchChecked: root.advancedStore.isManageCommunityOnTestModeEnabled + onClicked: { + root.advancedStore.toggleManageCommunityOnTestnet() + } + } + StatusSettingsLineButton { anchors.leftMargin: 0 anchors.rightMargin: 0 diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 9028e1b671..23a32bce2d 100644 --- a/ui/app/mainui/AppMain.qml +++ b/ui/app/mainui/AppMain.qml @@ -1266,6 +1266,8 @@ Item { sourceComponent: ChatLayout { id: chatLayoutComponent + readonly property bool isManageCommunityEnabledInAdvanced: appMain.rootStore.profileSectionStore.advancedStore.isManageCommunityOnTestModeEnabled + Binding { target: rootDropAreaPanel property: "enabled" @@ -1289,8 +1291,8 @@ Item { sectionItemModel: model createChatPropertiesStore: appMain.createChatPropertiesStore communitiesStore: appMain.communitiesStore - communitySettingsDisabled: production && appMain.rootStore.profileSectionStore.walletStore.areTestNetworksEnabled - + communitySettingsDisabled: !chatLayoutComponent.isManageCommunityEnabledInAdvanced && + (production && appMain.rootStore.profileSectionStore.walletStore.areTestNetworksEnabled) rootStore: ChatStores.RootStore { contactsStore: appMain.rootStore.contactStore communityTokensStore: appMain.communityTokensStore