This commit is contained in:
Timothy Jaeryang Baek 2025-12-02 02:53:49 -05:00
parent 4f50571b53
commit 734c04ebf0
3 changed files with 11 additions and 31 deletions

View file

@ -77,7 +77,7 @@
<div class="mx-2 mt-2">
<Tooltip content={user?.status_message}>
<div
class="mb-1 w-full gap-2 px-2.5 py-1.5 rounded-xl bg-gray-50 dark:text-white dark:bg-gray-900/50 text-black transition text-xs flex items-center"
class="w-full gap-2 px-2.5 py-1.5 rounded-xl bg-gray-50 dark:text-white dark:bg-gray-900/50 text-black transition text-xs flex items-center"
>
{#if user?.status_emoji}
<div class=" self-center shrink-0">

View file

@ -183,16 +183,9 @@
const initChannels = async () => {
// default (none), group, dm type
await channels.set(
(await getChannels(localStorage.token)).sort((a, b) =>
a.type === b.type
? 0
: a.type === 'dm'
? 1
: a.type === 'group'
? b.type === 'dm'
? -1
: 0
: -1
(await getChannels(localStorage.token)).sort(
(a, b) =>
['', null, 'group', 'dm'].indexOf(a.type) - ['', null, 'group', 'dm'].indexOf(b.type)
)
);
};

View file

@ -488,16 +488,9 @@
// handle channel created event
if (event.data?.type === 'channel:created') {
await channels.set(
(await getChannels(localStorage.token)).sort((a, b) =>
a.type === b.type
? 0
: a.type === 'dm'
? 1
: a.type === 'group'
? b.type === 'dm'
? -1
: 0
: -1
(await getChannels(localStorage.token)).sort(
(a, b) =>
['', null, 'group', 'dm'].indexOf(a.type) - ['', null, 'group', 'dm'].indexOf(b.type)
)
);
return;
@ -539,16 +532,10 @@
);
} else {
await channels.set(
(await getChannels(localStorage.token)).sort((a, b) =>
a.type === b.type
? 0
: a.type === 'dm'
? 1
: a.type === 'group'
? b.type === 'dm'
? -1
: 0
: -1
(await getChannels(localStorage.token)).sort(
(a, b) =>
['', null, 'group', 'dm'].indexOf(a.type) -
['', null, 'group', 'dm'].indexOf(b.type)
)
);
}