Fix squished quote in DMs and a crash on refresh
This commit is contained in:
parent
f474ca29e1
commit
7f3126ff11
2 changed files with 10 additions and 6 deletions
|
|
@ -32,7 +32,7 @@
|
|||
let muted = $state($isEventMuted(event))
|
||||
</script>
|
||||
|
||||
<div class="@container flex flex-col gap-2 {restProps.class}" style={restProps.style}>
|
||||
<div class="flex flex-col gap-2 {restProps.class}" style={restProps.style}>
|
||||
{#if muted}
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex gap-2 relative">
|
||||
|
|
@ -42,7 +42,11 @@
|
|||
<Button class="link ml-8" onclick={ignoreMute}>Show anyway</Button>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex items-start justify-between gap-2">
|
||||
<!-- The size container is the header, not the card: container-type contains a box's inline
|
||||
size, so a card that is its own container reports no width to an ancestor sized by its
|
||||
contents and collapses a quote inside a chat bubble. The header fills the card either way,
|
||||
so the query still measures the card's width. -->
|
||||
<div class="@container flex items-start justify-between gap-2">
|
||||
{#if !hideProfile}
|
||||
{#if minimal}
|
||||
@<ProfileName pubkey={event.pubkey} {url} />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {append, identity, uniq} from "@welshman/lib"
|
||||
import {identity, uniq} from "@welshman/lib"
|
||||
import {tagSpec, tagValue} from "@welshman/util"
|
||||
import {displayPubkey} from "@welshman/domain"
|
||||
import {makeRoomKey} from "@welshman/app"
|
||||
|
|
@ -6,7 +6,6 @@ import {decodePubkey} from "@lib/util"
|
|||
import {app, profiles, rooms} from "@app/core"
|
||||
import {PLATFORM_NAME} from "@app/env"
|
||||
import {decodeRelay} from "@app/relays"
|
||||
import {splitChatId} from "@app/chats"
|
||||
|
||||
const FALLBACK_APP_NAME = "Flotilla"
|
||||
|
||||
|
|
@ -92,8 +91,9 @@ const getChatTitle = (chatId: string | undefined, pubkey: string | undefined) =>
|
|||
return "Chat"
|
||||
}
|
||||
|
||||
const chatPeers = pubkey ? uniq(append(pubkey, splitChatId(chatId))) : splitChatId(chatId)
|
||||
const others = pubkey ? chatPeers.filter(pk => pk !== pubkey) : chatPeers
|
||||
// Read the id directly rather than through splitChatId, which resolves it against the signed-in
|
||||
// user and throws when there isn't one.
|
||||
const others = uniq(chatId.split(",")).filter(pk => pk !== pubkey)
|
||||
|
||||
if (others.length === 1) {
|
||||
return `Chat with ${displayPubkey(others[0])}`
|
||||
|
|
|
|||
Loading…
Reference in a new issue