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.left: parent.left
anchors.leftMargin: 24
Component.onCompleted: {
walletBtn.enabled = false
}
StyledText {
//% "Wallet Tab"
text: qsTrId("wallet-tab")
}
Switch {
checked: walletBtn.enabled
checked: appSettings.walletEnabled
onCheckedChanged: function(value) {
walletBtn.enabled = this.checked
appSettings.walletEnabled = this.checked
}
}
StyledText {

View File

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

View File

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