MCPcopy Create free account
hub / github.com/dfinity/orbit / registerUserLastActiveTracking

Function registerUserLastActiveTracking

apps/wallet/src/stores/session.store.ts:54–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53// A function that registers that a user is active every after a certain interval of time
54const registerUserLastActiveTracking = (): void => {
55 if (trackingUserActive) {
56 return;
57 }
58
59 trackingUserActive = setInterval(() => {
60 recordUserIsActive();
61 }, keepUserActiveEveryMs);
62
63 setTimeout(() => {
64 recordUserIsActive();
65 }, considerTheUserActiveAfterMs);
66};
67
68const recordUserIsActive = (): void => {
69 const session = useSessionStore();

Callers 1

initializeFunction · 0.85

Calls 1

recordUserIsActiveFunction · 0.85

Tested by

no test coverage detected