Skip to content

Commit

Permalink
stores: remove isWalletEnabled from shared/RootStore
Browse files Browse the repository at this point in the history
Closes: #16254
  • Loading branch information
micieslak committed Oct 2, 2024
1 parent a46f3b0 commit 9acf8d8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion storybook/pages/StatusChatInputPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ SplitView {
usersModel: fakeUsersModel

sharedStore: SharedStores.RootStore {
property bool isWalletEnabled: true
property bool gifUnfurlingEnabled: true

property var gifStore: SharedStores.GifStore {
Expand Down
1 change: 0 additions & 1 deletion storybook/qmlTests/tests/tst_StatusChatInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Item {
usersModel: ListModel {}

sharedStore: SharedStores.RootStore {
property bool isWalletEnabled: true
property bool gifUnfurlingEnabled: true

property var gifStore: SharedStores.GifStore {
Expand Down
2 changes: 2 additions & 0 deletions ui/app/mainui/AppMain.qml
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,8 @@ Item {
store: appMain.rootChatStore
transactionStore: appMain.transactionStore
walletAssetsStore: appMain.walletAssetsStore

isWalletEnabled: appMain.rootStore.profileSectionStore.profileStore.isWalletEnabled
}
}

Expand Down
4 changes: 2 additions & 2 deletions ui/imports/shared/status/StatusStickerMarket.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import shared 1.0
import shared.panels 1.0
import shared.popups 1.0
import shared.status 1.0
import shared.stores 1.0 as SharedStores
import shared.popups.send 1.0
import shared.stores.send 1.0

Expand All @@ -30,6 +29,7 @@ Item {
required property WalletAssetsStore walletAssetsStore
property string packId
property bool marketVisible
property bool isWalletEnabled

signal backClicked
signal uninstallClicked(string packId)
Expand Down Expand Up @@ -81,7 +81,7 @@ Item {
}
}

readonly property bool walletEnabled: SharedStores.RootStore.isWalletEnabled
readonly property bool walletEnabled: root.isWalletEnabled
onWalletEnabledChanged: {
update()
}
Expand Down
3 changes: 3 additions & 0 deletions ui/imports/shared/status/StatusStickersPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Popup {
required property TransactionStore transactionStore
required property WalletAssetsStore walletAssetsStore

property alias isWalletEnabled: stickerMarket.isWalletEnabled

signal stickerSelected(string hashId, string packId, string url)

QtObject {
Expand Down Expand Up @@ -95,6 +97,7 @@ Popup {

StatusStickerMarket {
id: stickerMarket

visible: false
Layout.fillWidth: true
Layout.fillHeight: true
Expand Down
1 change: 0 additions & 1 deletion ui/imports/shared/stores/RootStore.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ QtObject {
property var appSettingsInst: Global.appIsReady && !!appSettings? appSettings : null
property var accountSensitiveSettings: Global.appIsReady && !!localAccountSensitiveSettings? localAccountSensitiveSettings : null
property real volume: !!appSettingsInst ? appSettingsInst.volume * 0.01 : 0.5
property bool isWalletEnabled: Global.appIsReady? mainModule.sectionsModel.getItemEnabledBySectionType(Constants.appSection.wallet) : true

property bool notificationSoundsEnabled: !!appSettingsInst ? appSettingsInst.notificationSoundsEnabled : true
property bool neverAskAboutUnfurlingAgain: !!accountSensitiveSettings ? accountSensitiveSettings.neverAskAboutUnfurlingAgain : false
Expand Down

0 comments on commit 9acf8d8

Please sign in to comment.