diff --git a/src/partials/chat/RoomList.svelte b/src/partials/chat/RoomList.svelte
index 4df8bc0d..edef393d 100644
--- a/src/partials/chat/RoomList.svelte
+++ b/src/partials/chat/RoomList.svelte
@@ -1,12 +1,15 @@
-
-
+
+
- {#each search(q).slice(0, 10) as r}
+ {#each search(q).slice(0, 8) as r}
- setRoom(r.id)}>
@@ -52,6 +60,9 @@
{/if}
{/each}
+ -
+ {Math.floor(0, Object.keys(rooms).length - 8)} more rooms found
+
-
Create Room
diff --git a/src/routes/ChatRoom.svelte b/src/routes/ChatRoom.svelte
index aacf9291..3dbdf0f8 100644
--- a/src/routes/ChatRoom.svelte
+++ b/src/routes/ChatRoom.svelte
@@ -2,7 +2,7 @@
import {onMount} from 'svelte'
import {fly} from 'svelte/transition'
import {navigate} from 'svelte-routing'
- import {prop, last} from 'ramda'
+ import {prop, uniqBy, sortBy, last} from 'ramda'
import {switcherFn} from 'hurdak/src/core'
import {formatTimestamp} from 'src/util/misc'
import {toHtml} from 'src/util/html'
@@ -22,7 +22,7 @@
$: {
// Group messages so we're only showing the account once per chunk
- annotatedMessages = messages.reduce(
+ annotatedMessages = sortBy(prop('created_at'), uniqBy(prop('id'), messages)).reduce(
(mx, m) => {
const account = $accounts[m.pubkey]
@@ -164,8 +164,6 @@
-
-
-
+