refac: remember sidebar status

This commit is contained in:
Timothy J. Baek 2024-10-05 17:00:56 -07:00
parent ed1a2ab5e8
commit a860e98ab9

View File

@ -115,7 +115,11 @@
} }
}); });
showSidebar.set(window.innerWidth > BREAKPOINT); showSidebar.set(!$mobile ? localStorage.sidebar === 'true' : false);
showSidebar.subscribe((value) => {
localStorage.sidebar = value;
});
await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned')); await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned'));
await enablePagination(); await enablePagination();