- add account-level auto rating and daily polish tasks\n- add cached historical chat, media, emoji, and per-account realtime sync\n- add SQLite, MySQL, and PostgreSQL migrations and regression coverage\n- align account, sidebar, and chat interfaces with the new workflows
19 lines
480 B
TypeScript
19 lines
480 B
TypeScript
const storageKey = 'ydisks.sidebar.v1';
|
|
|
|
export const readSidebarCollapsed = (): boolean => {
|
|
try {
|
|
return window.localStorage.getItem(storageKey) === 'collapsed';
|
|
} catch {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
export const writeSidebarCollapsed = (collapsed: boolean): void => {
|
|
try {
|
|
window.localStorage.setItem(storageKey, collapsed ? 'collapsed' : 'expanded');
|
|
} catch {
|
|
// Storage can be unavailable in hardened browsers; the in-memory state
|
|
// remains fully functional.
|
|
}
|
|
};
|