diff options
Diffstat (limited to 'ui/routes/(app)')
| -rw-r--r-- | ui/routes/(app)/+layout.svelte | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte index 572a551..67fea64 100644 --- a/ui/routes/(app)/+layout.svelte +++ b/ui/routes/(app)/+layout.svelte @@ -8,7 +8,14 @@ import TinyGesture from 'tinygesture'; import { boot, subscribeToEvents } from '$lib/apiServer'; - import { channelsList, channelsMetaList, currentUser, logins, messages, onEvent } from '$lib/store'; + import { + channelsList, + channelsMetaList, + currentUser, + logins, + messages, + onEvent + } from '$lib/store'; import ChannelList from '$lib/components/ChannelList.svelte'; import CreateChannelForm from '$lib/components/CreateChannelForm.svelte'; @@ -117,16 +124,11 @@ const STORE_KEY_LAST_ACTIVE = 'pilcrow:lastActiveChannel'; function getLastActiveChannel() { - return ( - browser && JSON.parse(localStorage.getItem(STORE_KEY_LAST_ACTIVE)) - ); + return browser && JSON.parse(localStorage.getItem(STORE_KEY_LAST_ACTIVE)); } function setLastActiveChannel(channelId) { - browser && localStorage.setItem( - STORE_KEY_LAST_ACTIVE, - JSON.stringify(channelId) - ); + browser && localStorage.setItem(STORE_KEY_LAST_ACTIVE, JSON.stringify(channelId)); } afterNavigate(() => { |
