mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-23 10:11:38 +02:00
main: use Utils.epoch() for epoch
This commit is contained in:
parent
937cb98256
commit
b2255cfd24
7
main.qml
7
main.qml
@ -96,7 +96,6 @@ ApplicationWindow {
|
|||||||
property alias viewState: rootItem.state
|
property alias viewState: rootItem.state
|
||||||
property string prevSplashText;
|
property string prevSplashText;
|
||||||
property bool splashDisplayedBeforeButtonRequest;
|
property bool splashDisplayedBeforeButtonRequest;
|
||||||
property int appEpoch: Math.floor((new Date).getTime() / 1000)
|
|
||||||
property bool themeTransition: false
|
property bool themeTransition: false
|
||||||
|
|
||||||
// fiat price conversion
|
// fiat price conversion
|
||||||
@ -2203,8 +2202,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
function userActivity() {
|
function userActivity() {
|
||||||
// register user activity
|
// register user activity
|
||||||
var epoch = Math.floor((new Date).getTime()/1000);
|
appWindow.userLastActive = Utils.epoch();
|
||||||
appWindow.userLastActive = epoch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkInUserActivity() {
|
function checkInUserActivity() {
|
||||||
@ -2214,8 +2212,7 @@ ApplicationWindow {
|
|||||||
var inputDialogVisible = inputDialog && inputDialog.visible
|
var inputDialogVisible = inputDialog && inputDialog.visible
|
||||||
|
|
||||||
// prompt password after X seconds of inactivity
|
// prompt password after X seconds of inactivity
|
||||||
var epoch = Math.floor((new Date).getTime() / 1000);
|
var inactivity = Utils.epoch() - appWindow.userLastActive;
|
||||||
var inactivity = epoch - appWindow.userLastActive;
|
|
||||||
if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return;
|
if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return;
|
||||||
|
|
||||||
passwordDialog.onAcceptedCallback = function() {
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user