Global.settingsSubSubsection property (UI state in singleton) removed
Closes: #16457
This commit is contained in:
parent
5acb9fc8fb
commit
95e5f5d34d
|
@ -35,6 +35,7 @@ StatusSectionLayout {
|
|||
id: root
|
||||
|
||||
property alias settingsSubsection: profileContainer.currentIndex
|
||||
property int settingsSubSubsection
|
||||
|
||||
objectName: "profileStatusSectionLayout"
|
||||
|
||||
|
@ -73,7 +74,8 @@ StatusSectionLayout {
|
|||
keycardView.item.handleBackAction()
|
||||
break;
|
||||
}
|
||||
Global.settingsSubSubsection = -1
|
||||
|
||||
root.settingsSubSubsection = -1
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
|
@ -258,6 +260,8 @@ StatusSectionLayout {
|
|||
implicitHeight: parent.height
|
||||
contentWidth: d.contentWidth
|
||||
|
||||
settingsSubSubsection: root.settingsSubSubsection
|
||||
|
||||
rootStore: root.store
|
||||
tokensStore: root.tokensStore
|
||||
networkConnectionStore: root.networkConnectionStore
|
||||
|
|
|
@ -34,6 +34,8 @@ SettingsContentBase {
|
|||
property string myPublicKey: ""
|
||||
property alias currencySymbol: manageTokensView.currencySymbol
|
||||
|
||||
property int settingsSubSubsection
|
||||
|
||||
property ProfileSectionStore rootStore
|
||||
property WalletStore walletStore: rootStore.walletStore
|
||||
required property TokensStore tokensStore
|
||||
|
@ -112,10 +114,10 @@ SettingsContentBase {
|
|||
|
||||
readonly property var priv: QtObject {
|
||||
id: priv
|
||||
readonly property bool isManageTokensSubsection: Global.settingsSubSubsection === Constants.walletSettingsSubsection.manageAssets ||
|
||||
Global.settingsSubSubsection === Constants.walletSettingsSubsection.manageCollectibles ||
|
||||
Global.settingsSubSubsection === Constants.walletSettingsSubsection.manageHidden ||
|
||||
Global.settingsSubSubsection === Constants.walletSettingsSubsection.manageAdvanced
|
||||
readonly property bool isManageTokensSubsection: root.settingsSubSubsection === Constants.walletSettingsSubsection.manageAssets ||
|
||||
root.settingsSubSubsection === Constants.walletSettingsSubsection.manageCollectibles ||
|
||||
root.settingsSubSubsection === Constants.walletSettingsSubsection.manageHidden ||
|
||||
root.settingsSubSubsection === Constants.walletSettingsSubsection.manageAdvanced
|
||||
|
||||
readonly property var walletSettings: Settings {
|
||||
category: "walletSettings-" + root.myPublicKey
|
||||
|
@ -349,7 +351,7 @@ SettingsContentBase {
|
|||
|
||||
Binding on currentIndex {
|
||||
value: {
|
||||
switch (Global.settingsSubSubsection) {
|
||||
switch (root.settingsSubSubsection) {
|
||||
case Constants.walletSettingsSubsection.manageAssets:
|
||||
return 0
|
||||
case Constants.walletSettingsSubsection.manageCollectibles:
|
||||
|
|
|
@ -147,7 +147,7 @@ Item {
|
|||
|
||||
function onActiveSectionChanged() {
|
||||
createChatView.opened = false
|
||||
Global.settingsSubSubsection = -1
|
||||
profileLoader.settingsSubSubsection = -1
|
||||
}
|
||||
|
||||
function onOpenActivityCenter() {
|
||||
|
@ -502,7 +502,7 @@ Item {
|
|||
|
||||
if (sectionType === Constants.appSection.profile) {
|
||||
profileLoader.settingsSubsection = subsection
|
||||
Global.settingsSubSubsection = subSubsection;
|
||||
profileLoader.settingsSubSubsection = subSubsection;
|
||||
} else if (sectionType === Constants.appSection.wallet) {
|
||||
appView.children[Constants.appViewStackIndex.wallet].item.openDesiredView(subsection, subSubsection, data)
|
||||
}
|
||||
|
@ -1435,6 +1435,7 @@ Item {
|
|||
id: profileLoader
|
||||
|
||||
property int settingsSubsection: Constants.settingsSubsection.profile
|
||||
property int settingsSubSubsection: -1
|
||||
|
||||
active: appView.currentIndex === Constants.appViewStackIndex.profile
|
||||
asynchronous: true
|
||||
|
@ -1452,6 +1453,7 @@ Item {
|
|||
collectiblesStore: appMain.walletCollectiblesStore
|
||||
currencyStore: appMain.currencyStore
|
||||
isCentralizedMetricsEnabled: appMain.isCentralizedMetricsEnabled
|
||||
settingsSubSubsection: profileLoader.settingsSubSubsection
|
||||
|
||||
Binding on settingsSubsection {
|
||||
value: profileLoader.settingsSubsection
|
||||
|
|
|
@ -6,7 +6,6 @@ QtObject {
|
|||
id: root
|
||||
|
||||
property bool activityPopupOpened: false
|
||||
property int settingsSubSubsection: -1
|
||||
|
||||
property bool appIsReady: false
|
||||
|
||||
|
|
Loading…
Reference in New Issue