stores: remove isWalletEnabled from shared/RootStore

Closes: #16254
This commit is contained in:
Michał Cieślak 2024-10-02 11:08:52 +02:00 committed by Michał
parent a46f3b0864
commit 9acf8d8709
6 changed files with 7 additions and 5 deletions

View File

@ -96,7 +96,6 @@ SplitView {
usersModel: fakeUsersModel usersModel: fakeUsersModel
sharedStore: SharedStores.RootStore { sharedStore: SharedStores.RootStore {
property bool isWalletEnabled: true
property bool gifUnfurlingEnabled: true property bool gifUnfurlingEnabled: true
property var gifStore: SharedStores.GifStore { property var gifStore: SharedStores.GifStore {

View File

@ -29,7 +29,6 @@ Item {
usersModel: ListModel {} usersModel: ListModel {}
sharedStore: SharedStores.RootStore { sharedStore: SharedStores.RootStore {
property bool isWalletEnabled: true
property bool gifUnfurlingEnabled: true property bool gifUnfurlingEnabled: true
property var gifStore: SharedStores.GifStore { property var gifStore: SharedStores.GifStore {

View File

@ -631,6 +631,8 @@ Item {
store: appMain.rootChatStore store: appMain.rootChatStore
transactionStore: appMain.transactionStore transactionStore: appMain.transactionStore
walletAssetsStore: appMain.walletAssetsStore walletAssetsStore: appMain.walletAssetsStore
isWalletEnabled: appMain.rootStore.profileSectionStore.profileStore.isWalletEnabled
} }
} }

View File

@ -13,7 +13,6 @@ import shared 1.0
import shared.panels 1.0 import shared.panels 1.0
import shared.popups 1.0 import shared.popups 1.0
import shared.status 1.0 import shared.status 1.0
import shared.stores 1.0 as SharedStores
import shared.popups.send 1.0 import shared.popups.send 1.0
import shared.stores.send 1.0 import shared.stores.send 1.0
@ -30,6 +29,7 @@ Item {
required property WalletAssetsStore walletAssetsStore required property WalletAssetsStore walletAssetsStore
property string packId property string packId
property bool marketVisible property bool marketVisible
property bool isWalletEnabled
signal backClicked signal backClicked
signal uninstallClicked(string packId) signal uninstallClicked(string packId)
@ -81,7 +81,7 @@ Item {
} }
} }
readonly property bool walletEnabled: SharedStores.RootStore.isWalletEnabled readonly property bool walletEnabled: root.isWalletEnabled
onWalletEnabledChanged: { onWalletEnabledChanged: {
update() update()
} }

View File

@ -22,6 +22,8 @@ Popup {
required property TransactionStore transactionStore required property TransactionStore transactionStore
required property WalletAssetsStore walletAssetsStore required property WalletAssetsStore walletAssetsStore
property alias isWalletEnabled: stickerMarket.isWalletEnabled
signal stickerSelected(string hashId, string packId, string url) signal stickerSelected(string hashId, string packId, string url)
QtObject { QtObject {
@ -95,6 +97,7 @@ Popup {
StatusStickerMarket { StatusStickerMarket {
id: stickerMarket id: stickerMarket
visible: false visible: false
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true

View File

@ -14,7 +14,6 @@ QtObject {
property var appSettingsInst: Global.appIsReady && !!appSettings? appSettings : null property var appSettingsInst: Global.appIsReady && !!appSettings? appSettings : null
property var accountSensitiveSettings: Global.appIsReady && !!localAccountSensitiveSettings? localAccountSensitiveSettings : null property var accountSensitiveSettings: Global.appIsReady && !!localAccountSensitiveSettings? localAccountSensitiveSettings : null
property real volume: !!appSettingsInst ? appSettingsInst.volume * 0.01 : 0.5 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 notificationSoundsEnabled: !!appSettingsInst ? appSettingsInst.notificationSoundsEnabled : true
property bool neverAskAboutUnfurlingAgain: !!accountSensitiveSettings ? accountSensitiveSettings.neverAskAboutUnfurlingAgain : false property bool neverAskAboutUnfurlingAgain: !!accountSensitiveSettings ? accountSensitiveSettings.neverAskAboutUnfurlingAgain : false