MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / clearActiveUnread

Function clearActiveUnread

apps/kimi-web/src/composables/useKimiWebClient.ts:440–451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438// a hidden tab becomes visible again, so a dot that arrived while hidden is
439// dropped once the user is actually looking.
440function clearActiveUnread(): void {
441 const active = rawState.activeSessionId;
442 if (
443 active &&
444 rawState.unreadBySession[active] &&
445 typeof document !== 'undefined' &&
446 document.visibilityState === 'visible'
447 ) {
448 rawState.unreadBySession = { ...rawState.unreadBySession, [active]: false };
449 saveUnread({ [active]: false });
450 }
451}
452
453if (typeof window !== 'undefined') {
454 window.addEventListener('storage', (event) => {

Callers 1

Calls 1

saveUnreadFunction · 0.90

Tested by

no test coverage detected