summaryrefslogtreecommitdiff
path: root/ui/lib/store/channels.svelte.js
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2025-01-13 17:34:46 -0500
committerKit La Touche <kit@transneptune.net>2025-01-13 17:34:46 -0500
commit55c6b6788f670cd7b2c96f6e8ae7bb2378b86176 (patch)
treeb4ad6208a72cdb0b83c6ff89ff61de20539dc777 /ui/lib/store/channels.svelte.js
parent21c566479962cd7ecfa6dccd929b3069d0b201f9 (diff)
parentbdb7e677e2eaae1cc730915c79dd024c8acebdd3 (diff)
Merge branch 'main' into wip/fonts
Diffstat (limited to 'ui/lib/store/channels.svelte.js')
-rw-r--r--ui/lib/store/channels.svelte.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/ui/lib/store/channels.svelte.js b/ui/lib/store/channels.svelte.js
index 8919be0..c82f9aa 100644
--- a/ui/lib/store/channels.svelte.js
+++ b/ui/lib/store/channels.svelte.js
@@ -1,5 +1,5 @@
import { DateTime } from 'luxon';
-const EPOCH_STRING = "1970-01-01T00:00:00Z";
+const EPOCH_STRING = '1970-01-01T00:00:00Z';
// For reasons unclear to me, a straight up class definition with a constructor
// doesn't seem to work, reactively. So we resort to this.
@@ -15,7 +15,7 @@ function makeChannelObject({ id, name, draft = '', lastReadAt = null, scrollPosi
name,
lastReadAt: lastReadAt || DateTime.fromISO(EPOCH_STRING),
draft,
- scrollPosition,
+ scrollPosition
};
}
@@ -33,10 +33,7 @@ export class Channels {
}
addChannel(id, name) {
- this.channels = [
- ...this.channels,
- makeChannelObject({ id, name }),
- ];
+ this.channels = [...this.channels, makeChannelObject({ id, name })];
this.sort();
return this;
}