aboutsummaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2022-04-23 07:24:20 +0200
committerselsta <selsta@sent.at>2022-04-23 07:26:52 +0200
commit37a5bdc331af9589714ed38c9804028076e079f0 (patch)
tree613985b438a0f820092d876cd92308d9d2dc82b7 /main.qml
parentb31cc36de2cc612060b2db63f42a5af42756a719 (diff)
downloadmonzero-gui-37a5bdc331af9589714ed38c9804028076e079f0.tar.gz
monzero-gui-37a5bdc331af9589714ed38c9804028076e079f0.tar.xz
monzero-gui-37a5bdc331af9589714ed38c9804028076e079f0.zip
main: only update fiat price with open wallet
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml22
1 files changed, 3 insertions, 19 deletions
diff --git a/main.qml b/main.qml
index 2a82a693..31450032 100644
--- a/main.qml
+++ b/main.qml
@@ -1156,13 +1156,10 @@ ApplicationWindow {
Timer {
id: fiatPriceTimer
interval: 1000 * 60;
- running: persistentSettings.fiatPriceEnabled;
+ running: persistentSettings.fiatPriceEnabled && currentWallet !== undefined
repeat: true
- onTriggered: {
- if(persistentSettings.fiatPriceEnabled)
- appWindow.fiatApiRefresh();
- }
- triggeredOnStart: false
+ onTriggered: appWindow.fiatApiRefresh()
+ triggeredOnStart: true
}
function fiatApiParseTicker(url, resp, currency){
@@ -1301,14 +1298,6 @@ ApplicationWindow {
leftPanel.balanceFiatString = bFiat;
}
- function fiatTimerStart(){
- fiatPriceTimer.start();
- }
-
- function fiatTimerStop(){
- fiatPriceTimer.stop();
- }
-
function fiatApiError(msg){
console.log("fiatPriceError: " + msg);
}
@@ -1364,11 +1353,6 @@ ApplicationWindow {
openWallet("wizard");
}
- if(persistentSettings.fiatPriceEnabled){
- appWindow.fiatApiRefresh();
- appWindow.fiatTimerStart();
- }
-
const desktopEntryEnabled = (typeof builtWithDesktopEntry != "undefined") && builtWithDesktopEntry;
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable && desktopEntryEnabled) {
persistentSettings.askDesktopShortcut = false;