main: use Utils.epoch() for epoch

This commit is contained in:
selsta 2021-05-26 00:55:50 +02:00
parent 937cb98256
commit b2255cfd24
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -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
@ -2203,8 +2202,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 inputDialogVisible = inputDialog && inputDialog.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() {