{#if !isLoggedIn}
Log in to see your messages.
{:else if $inboxLoading}
{:else if conversationList.length === 0}
No conversations yet.
{:else} {#each conversationList as conv (conv.pubkey)}
selectConversation(conv.pubkey)} > {#if getAvatar(conv.pubkey)} {:else}
{getDisplayName(conv.pubkey).charAt(0).toUpperCase()}
{/if}
{getDisplayName(conv.pubkey)} {formatTime(conv.lastMessage?.created_at)}
{truncateMessage(conv.lastMessage?.decrypted || conv.lastMessage?.content || '')}
{#if conv.unreadCount > 0} {conv.unreadCount} {/if}
{/each} {/if}
{#if $selectedConversation}
{#if getAvatar($selectedConversation)} {:else}
{getDisplayName($selectedConversation).charAt(0).toUpperCase()}
{/if} {getDisplayName($selectedConversation)}
{#each currentMessages as msg (msg.id)}
{msg.decrypted || msg.content}
{formatTime(msg.created_at)}
{/each}
{/if}