mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
main: only update fiat price with open wallet
This commit is contained in:
parent
b31cc36de2
commit
37a5bdc331
2 changed files with 3 additions and 22 deletions
22
main.qml
22
main.qml
|
@ -1156,13 +1156,10 @@ ApplicationWindow {
|
||||||
Timer {
|
Timer {
|
||||||
id: fiatPriceTimer
|
id: fiatPriceTimer
|
||||||
interval: 1000 * 60;
|
interval: 1000 * 60;
|
||||||
running: persistentSettings.fiatPriceEnabled;
|
running: persistentSettings.fiatPriceEnabled && currentWallet !== undefined
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: appWindow.fiatApiRefresh()
|
||||||
if(persistentSettings.fiatPriceEnabled)
|
triggeredOnStart: true
|
||||||
appWindow.fiatApiRefresh();
|
|
||||||
}
|
|
||||||
triggeredOnStart: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fiatApiParseTicker(url, resp, currency){
|
function fiatApiParseTicker(url, resp, currency){
|
||||||
|
@ -1301,14 +1298,6 @@ ApplicationWindow {
|
||||||
leftPanel.balanceFiatString = bFiat;
|
leftPanel.balanceFiatString = bFiat;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fiatTimerStart(){
|
|
||||||
fiatPriceTimer.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
function fiatTimerStop(){
|
|
||||||
fiatPriceTimer.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
function fiatApiError(msg){
|
function fiatApiError(msg){
|
||||||
console.log("fiatPriceError: " + msg);
|
console.log("fiatPriceError: " + msg);
|
||||||
}
|
}
|
||||||
|
@ -1364,11 +1353,6 @@ ApplicationWindow {
|
||||||
openWallet("wizard");
|
openWallet("wizard");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(persistentSettings.fiatPriceEnabled){
|
|
||||||
appWindow.fiatApiRefresh();
|
|
||||||
appWindow.fiatTimerStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
const desktopEntryEnabled = (typeof builtWithDesktopEntry != "undefined") && builtWithDesktopEntry;
|
const desktopEntryEnabled = (typeof builtWithDesktopEntry != "undefined") && builtWithDesktopEntry;
|
||||||
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable && desktopEntryEnabled) {
|
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable && desktopEntryEnabled) {
|
||||||
persistentSettings.askDesktopShortcut = false;
|
persistentSettings.askDesktopShortcut = false;
|
||||||
|
|
|
@ -165,7 +165,6 @@ Rectangle {
|
||||||
if (!checked) {
|
if (!checked) {
|
||||||
console.log("Disabled price conversion");
|
console.log("Disabled price conversion");
|
||||||
persistentSettings.fiatPriceEnabled = false;
|
persistentSettings.fiatPriceEnabled = false;
|
||||||
appWindow.fiatTimerStop();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,8 +231,6 @@ Rectangle {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Enabled price conversion");
|
console.log("Enabled price conversion");
|
||||||
persistentSettings.fiatPriceEnabled = true;
|
persistentSettings.fiatPriceEnabled = true;
|
||||||
appWindow.fiatApiRefresh();
|
|
||||||
appWindow.fiatTimerStart();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue