feat: remember wallet enabled in QT setting

This commit is contained in:
Jonathan Rainville 2020-09-10 11:26:45 -04:00 committed by Iuri Matias
parent 3e0ca2f938
commit 64c2ff099e
3 changed files with 4 additions and 6 deletions

View File

@ -31,18 +31,15 @@ Item {
anchors.topMargin: 20 anchors.topMargin: 20
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 24 anchors.leftMargin: 24
Component.onCompleted: {
walletBtn.enabled = false
}
StyledText { StyledText {
//% "Wallet Tab" //% "Wallet Tab"
text: qsTrId("wallet-tab") text: qsTrId("wallet-tab")
} }
Switch { Switch {
checked: walletBtn.enabled checked: appSettings.walletEnabled
onCheckedChanged: function(value) { onCheckedChanged: function(value) {
walletBtn.enabled = this.checked appSettings.walletEnabled = this.checked
} }
} }
StyledText { StyledText {

View File

@ -78,7 +78,7 @@ RowLayout {
TabButton { TabButton {
id: walletBtn id: walletBtn
enabled: isExperimental === "1" enabled: isExperimental === "1" || rowLayout.appSettings.walletEnabled
visible: this.enabled visible: this.enabled
width: 40 width: 40
height: this.enabled ? 40 : 0 height: this.enabled ? 40 : 0

View File

@ -66,6 +66,7 @@ ApplicationWindow {
property var chatSplitView property var chatSplitView
property var walletSplitView property var walletSplitView
property var profileSplitView property var profileSplitView
property bool walletEnabled: false
property bool displayChatImages: false property bool displayChatImages: false
property bool compactMode property bool compactMode
property string locale: "en" property string locale: "en"