diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-05-06 00:40:36 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-05-06 00:40:36 -0500 |
| commit | 1d3a2010778befdfcf25c6bbbc012a2bb5ff5fd5 (patch) | |
| tree | c57863268bd11573ea58dbbc823e0aae51781ef5 /main.qml | |
| parent | a91a4f51ab7957faa098ce314f574895b1fbfe40 (diff) | |
| parent | 503c1af5f8e75aae7a87afc5c0b2b33fefda5a3e (diff) | |
| download | monzero-gui-1d3a2010778befdfcf25c6bbbc012a2bb5ff5fd5.tar.gz monzero-gui-1d3a2010778befdfcf25c6bbbc012a2bb5ff5fd5.tar.xz monzero-gui-1d3a2010778befdfcf25c6bbbc012a2bb5ff5fd5.zip | |
Merge pull request #2879
ca79525 Slider component (xiphon)
503c1af SettingsLayout: implement autosave, enabled by default (10 minutes) (xiphon)
Diffstat (limited to 'main.qml')
| -rw-r--r-- | main.qml | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1370,6 +1370,8 @@ ApplicationWindow { property int lockOnUserInActivityInterval: 10 // minutes property bool blackTheme: true property bool checkForUpdates: true + property bool autosave: true + property int autosaveMinutes: 10 property bool fiatPriceEnabled: false property bool fiatPriceToggle: false @@ -1811,6 +1813,24 @@ ApplicationWindow { } } + Timer { + id: autosaveTimer + interval: persistentSettings.autosaveMinutes * 60 * 1000 + repeat: true + running: persistentSettings.autosave + onTriggered: { + if (currentWallet) { + currentWallet.storeAsync(function(success) { + if (success) { + appWindow.showStatusMessage(qsTr("Autosaved the wallet"), 3); + } else { + appWindow.showStatusMessage(qsTr("Failed to autosave the wallet"), 3); + } + }); + } + } + } + // TODO: Make the callback dynamic Timer { id: statusMessageTimer |
