Skip to content

Commit

Permalink
WIP fix(useActiveSession): add clearTimeout, disable toast message
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Oct 15, 2023
1 parent 597450f commit 06a028f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/composables/useActiveSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ export function useActiveSession() {

try {
await setSessionState(token.value, SESSION.STATE.INACTIVE)
showInfo(t('spreed', 'Session has been marked as inactive'))
// TODO to many verbose from this state change
// showInfo(t('spreed', 'Session has been marked as inactive'))
console.info('Session has been marked as inactive')
} catch (error) {
console.error(error)
Expand All @@ -112,6 +113,7 @@ export function useActiveSession() {
document.removeEventListener('mouseenter', handleMouseMove)
document.removeEventListener('mouseleave', handleMouseMove)
} else if (type === 'blur') {
clearTimeout(inactiveTimer.value)
inactiveTimer.value = setTimeout(() => {
setSessionAsInactive()
}, INACTIVE_TIME_MS)
Expand Down

0 comments on commit 06a028f

Please sign in to comment.