aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Brydolf <jacob@brydolf.net>2016-10-04 12:15:29 +0200
committerIlya Kitaev <mbg033@gmail.com>2016-10-10 00:15:17 +0300
commit9cc92bf9d69652104b28e0907de12d83cfadaa20 (patch)
treedc1807e17029f1595cb36ee4cf3df7291e110819
parent53d3bc4f06eb8f4437b08c48ffff08d4ae793eac (diff)
downloadmonzero-gui-9cc92bf9d69652104b28e0907de12d83cfadaa20.tar.gz
monzero-gui-9cc92bf9d69652104b28e0907de12d83cfadaa20.tar.xz
monzero-gui-9cc92bf9d69652104b28e0907de12d83cfadaa20.zip
added onPageCompleted
-rw-r--r--MiddlePanel.qml5
-rw-r--r--pages/Receive.qml21
2 files changed, 18 insertions, 8 deletions
diff --git a/MiddlePanel.qml b/MiddlePanel.qml
index a8529c9b..6ce1c242 100644
--- a/MiddlePanel.qml
+++ b/MiddlePanel.qml
@@ -44,6 +44,11 @@ Rectangle {
onCurrentViewChanged: {
if (currentView) {
stackView.replace(currentView)
+
+ // Component.onCompleted is called before wallet is initilized
+ if (typeof currentView.onPageCompleted === "function") {
+ currentView.onPageCompleted();
+ }
}
}
diff --git a/pages/Receive.qml b/pages/Receive.qml
index 1345af99..4ea32a2f 100644
--- a/pages/Receive.qml
+++ b/pages/Receive.qml
@@ -1,21 +1,21 @@
// Copyright (c) 2014-2015, The Monero Project
-//
+//
// All rights reserved.
-//
+//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
-//
+//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
-//
+//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
-//
+//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
-//
+//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
@@ -49,6 +49,7 @@ Rectangle {
addressLine.text = appWindow.currentWallet.address
integratedAddressLine.text = appWindow.currentWallet.integratedAddress(payment_id)
}
+
paymentIdLine.text = payment_id
}
@@ -180,9 +181,13 @@ Rectangle {
}
- Component.onCompleted: {
+ function onPageCompleted() {
console.log("Receive page loaded");
- updatePaymentId()
+
+ if(addressLine.text.length == 0) {
+ updatePaymentId()
+ }
+
}
}