From 950ac552814fc7f5dd17003faee493a86714cfce Mon Sep 17 00:00:00 2001
From: mmbyday <bromark@protonmail.com>
Date: Thu, 6 Dec 2018 14:56:23 -0500
Subject: [PATCH] receive: enable advanced option checkbox2 to persist

---
 main.qml          | 1 +
 pages/Receive.qml | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/main.qml b/main.qml
index 854b547b..d40b30c4 100644
--- a/main.qml
+++ b/main.qml
@@ -1019,6 +1019,7 @@ ApplicationWindow {
         property string daemonUsername: ""
         property string daemonPassword: ""
         property bool transferShowAdvanced: false
+        property bool receiveShowAdvanced: false
         property string blockchainDataDir: ""
         property bool useRemoteNode: false
         property string remoteNodeAddress: ""
diff --git a/pages/Receive.qml b/pages/Receive.qml
index 61403936..24dd787d 100644
--- a/pages/Receive.qml
+++ b/pages/Receive.qml
@@ -48,7 +48,6 @@ Rectangle {
     property var model
     property var current_address
     property int current_subaddress_table_index: 0
-    property bool advancedRowVisible: false
     property alias receiveHeight: mainLayout.height
     property alias addressText : pageReceive.current_address
 
@@ -398,9 +397,9 @@ Rectangle {
         RowLayout {
             CheckBox2 {
                 id: showAdvancedCheckbox
-                checked: false
+                checked: persistentSettings.receiveShowAdvanced
                 onClicked: {
-                    advancedRowVisible = !advancedRowVisible;
+                    persistentSettings.receiveShowAdvanced = !persistentSettings.receiveShowAdvanced
                 }
                 text: qsTr("Advanced options") + translationManager.emptyString
             }
@@ -411,7 +410,7 @@ Rectangle {
             columns: (isMobile)? 1 : 2
             Layout.fillWidth: true
             columnSpacing: 32 * scaleRatio
-            visible: advancedRowVisible
+            visible: persistentSettings.receiveShowAdvanced
 
             ColumnLayout {
                 Layout.alignment: Qt.AlignTop