diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-05-14 00:16:09 +0800 |
---|---|---|
committer | Dan J Miller <danjm.com@gmail.com> | 2019-05-14 00:16:09 +0800 |
commit | 28c4001f5269eb170f14bd2829698ee402b2cfbf (patch) | |
tree | a9cb1fbf6fbbb2304c0d3224c1856e70a1fc69e5 /ui/app/store | |
parent | 08e8fb21dc142ab21184c1125f55b9f3e0ce6412 (diff) | |
download | tangerine-wallet-browser-28c4001f5269eb170f14bd2829698ee402b2cfbf.tar.gz tangerine-wallet-browser-28c4001f5269eb170f14bd2829698ee402b2cfbf.tar.zst tangerine-wallet-browser-28c4001f5269eb170f14bd2829698ee402b2cfbf.zip |
Update auto-logout to recognize idle time in background (#6593)
* Fix wording of autoLogoutTimeLimitDescription
* AppStateController and update auto-logout functionality
Diffstat (limited to 'ui/app/store')
-rw-r--r-- | ui/app/store/actions.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js index 7d45f0932..7f6cbea1f 100644 --- a/ui/app/store/actions.js +++ b/ui/app/store/actions.js @@ -356,6 +356,10 @@ var actions = { setSelectedSettingsRpcUrl, SET_NETWORKS_TAB_ADD_MODE: 'SET_NETWORKS_TAB_ADD_MODE', setNetworksTabAddMode, + + // AppStateController-related actions + SET_LAST_ACTIVE_TIME: 'SET_LAST_ACTIVE_TIME', + setLastActiveTime, } module.exports = actions @@ -2760,3 +2764,13 @@ function setNetworksTabAddMode (isInAddMode) { value: isInAddMode, } } + +function setLastActiveTime () { + return (dispatch) => { + background.setLastActiveTime((err) => { + if (err) { + return dispatch(actions.displayWarning(err.message)) + } + }) + } +} |