diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2021-07-06 11:41:11 -0400 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2021-07-06 11:41:11 -0400 |
| commit | 873074320734e555ebfad59e33bab71b7e2e9368 (patch) | |
| tree | 1b41cda14162c4e805a60116dc921172cb9bcd22 | |
| parent | 4c67007e5b6c2eee166313a93ae165f7e17b1ff4 (diff) | |
| parent | b2255cfd24afd4ea529824cb716c303d3aa68ef1 (diff) | |
| download | monzero-gui-873074320734e555ebfad59e33bab71b7e2e9368.tar.gz monzero-gui-873074320734e555ebfad59e33bab71b7e2e9368.tar.xz monzero-gui-873074320734e555ebfad59e33bab71b7e2e9368.zip | |
Merge pull request #3503
b2255cf main: use Utils.epoch() for epoch (selsta)
| -rw-r--r-- | main.qml | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -96,7 +96,6 @@ ApplicationWindow { property alias viewState: rootItem.state property string prevSplashText; property bool splashDisplayedBeforeButtonRequest; - property int appEpoch: Math.floor((new Date).getTime() / 1000) property bool themeTransition: false // fiat price conversion @@ -2201,8 +2200,7 @@ ApplicationWindow { function userActivity() { // register user activity - var epoch = Math.floor((new Date).getTime()/1000); - appWindow.userLastActive = epoch; + appWindow.userLastActive = Utils.epoch(); } function checkInUserActivity() { @@ -2214,8 +2212,7 @@ ApplicationWindow { var informationPopupVisible = informationPopup && informationPopup.visible // prompt password after X seconds of inactivity - var epoch = Math.floor((new Date).getTime() / 1000); - var inactivity = epoch - appWindow.userLastActive; + var inactivity = Utils.epoch() - appWindow.userLastActive; if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return; passwordDialog.onAcceptedCallback = function() { |
