From 2112135c6f96c666b5be201e0884249f731dd14b Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Tue, 21 Jun 2022 11:00:54 +0200 Subject: [PATCH] fix(@communities): remove totally the toggle for experimental feature fixes #6175 --- .../AppLayouts/Profile/panels/MenuPanel.qml | 3 +- .../views/chat/InvitationBubbleView.qml | 69 +++++-------------- 2 files changed, 20 insertions(+), 52 deletions(-) diff --git a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml index 2a6b8ff959..e1ea7e0ac2 100644 --- a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml @@ -64,7 +64,8 @@ Column { onClicked: root.menuItemClicked(model) visible: { (model.subsection !== Constants.settingsSubsection.browserSettings && model.subsection !== Constants.settingsSubsection.wallet) || - (model.subsection === Constants.settingsSubsection.browserSettings && root.browserMenuItemEnabled) || + (model.subsection === Constants.settingsSubsection.browserSettings && root.browserMenuItemEnabled) || + (model.subsection === Constants.settingsSubsection.communitiesSettings) || (model.subsection === Constants.settingsSubsection.wallet && root.walletMenuItemEnabled) } badge.value: { diff --git a/ui/imports/shared/views/chat/InvitationBubbleView.qml b/ui/imports/shared/views/chat/InvitationBubbleView.qml index 1e68403fad..74f3ce8ddf 100644 --- a/ui/imports/shared/views/chat/InvitationBubbleView.qml +++ b/ui/imports/shared/views/chat/InvitationBubbleView.qml @@ -51,30 +51,6 @@ Item { } } - Component { - id: confirmationPopupComponent - ConfirmationDialog { - property string settingsProp: "" - property var onConfirmed: (function(){}) - 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." - 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-") - //% "I understand" - confirmButtonLabel: qsTrId("i-understand") - onConfirmButtonClicked: { - onConfirmed() - close() - } - - onCancelButtonClicked: { - close() - } - onClosed: { - destroy() - } - } - } - Component { id: communityIntroDialog @@ -291,36 +267,27 @@ Item { enabled: true text: qsTr("Unsupported state") onClicked: { + let error - let onBtnClick = function(){ - let error - - if (rectangleBubble.state === "joined") { - root.store.setActiveCommunity(communityId); - return - } - if (rectangleBubble.state === "unjoined") { - Global.openPopup(communityIntroDialog, { joinMethod: () => { - let error = root.store.joinCommunity(communityId) - if (error) joiningError.showError(error) - } }); - } - else if (rectangleBubble.state === "requestToJoin") { - Global.openPopup(communityIntroDialog, { joinMethod: () => { - let error = root.store.requestToJoinCommunity(communityId, userProfile.name) - if (error) joiningError.showError(error) - else rectangleBubble.isPendingRequest = root.store.isCommunityRequestPending(communityId) - } }); - } - - if (error) joiningError.showError(error) + if (rectangleBubble.state === "joined") { + root.store.setActiveCommunity(communityId); + return + } + if (rectangleBubble.state === "unjoined") { + Global.openPopup(communityIntroDialog, { joinMethod: () => { + let error = root.store.joinCommunity(communityId) + if (error) joiningError.showError(error) + } }); + } + else if (rectangleBubble.state === "requestToJoin") { + Global.openPopup(communityIntroDialog, { joinMethod: () => { + let error = root.store.requestToJoinCommunity(communityId, userProfile.name) + if (error) joiningError.showError(error) + else rectangleBubble.isPendingRequest = root.store.isCommunityRequestPending(communityId) + } }); } - if (localAccountSensitiveSettings.communitiesEnabled) { - onBtnClick(); - } else { - Global.openPopup(confirmationPopupComponent, { onConfirmed: onBtnClick }); - } + if (error) joiningError.showError(error) } MessageDialog {