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