diff --git a/src/app/components/ConversationCard.svelte b/src/app/components/ConversationCard.svelte new file mode 100644 index 0000000..7d649b8 --- /dev/null +++ b/src/app/components/ConversationCard.svelte @@ -0,0 +1,70 @@ + + + + {/if} + + diff --git a/src/app/components/SpaceRecentActivity.svelte b/src/app/components/SpaceRecentActivity.svelte index bea24e0..0c87b7a 100644 --- a/src/app/components/SpaceRecentActivity.svelte +++ b/src/app/components/SpaceRecentActivity.svelte @@ -1,16 +1,12 @@
@@ -76,54 +76,25 @@
{#if $conversations.length === 0} -
-

No recent conversations

-
+ {#if $messages.length > 0} + {@const events = $messages.slice(0, 1)} + {@const event = events[0]} + {@const room = getTagValue("h", event.tags)!} + + {:else} +
+

No recent conversations

+
+ {/if} {:else} {#each $conversations.slice(0, limit) as { room, events, latest, earliest, participants } (latest.id)} - -
- + {/each} {#if $conversations.length > limit}