Skip to content

Commit ea86c82

Browse files
Add methods to start and stop idle timer
1 parent 67523e1 commit ea86c82

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

dist/build.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/build.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ export default {
7979
},
8080
methods: {
8181
resetAppIdleTimeout () {
82-
idle.lastId = idle.resetTimeout(idle.lastId, idle.settings)
82+
if (idle.lastId) {
83+
idle.lastId = idle.resetTimeout(idle.lastId, idle.settings)
84+
}
85+
},
86+
startAppIdleTimeout () {
87+
idle.start()
88+
},
89+
stopAppIdleTimeout () {
90+
idle.stop()
8391
}
8492
}
8593
})

0 commit comments

Comments
 (0)