Skip to content

Commit

Permalink
Add methods to start and stop idle timer
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroiglesias committed May 10, 2019
1 parent 67523e1 commit ea86c82
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/build.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ export default {
},
methods: {
resetAppIdleTimeout () {
idle.lastId = idle.resetTimeout(idle.lastId, idle.settings)
if (idle.lastId) {
idle.lastId = idle.resetTimeout(idle.lastId, idle.settings)
}
},
startAppIdleTimeout () {
idle.start()
},
stopAppIdleTimeout () {
idle.stop()
}
}
})
Expand Down

0 comments on commit ea86c82

Please sign in to comment.