damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 2b0a7d126d500ea731f0528ddecec1d635a4e600
parent 6e2c133faa47f198b48ebe521868b3e360af6cd5
Author: Daniel D’Aquino <daniel@daquino.me>
Date:   Sat, 13 Jul 2024 00:31:37 +0000

Add missing mention view from chat event bubble view

This commit adds event mentions to the chat bubbles.

Testing
-------

PASS

Damus: This commit
Device: iPhone 15 simulator
iOS: 17.5
Coverage:
- Tested referencing an event on a thread reply. Thread reply shows up as expected
- Checked appearance on light and dark mode
- Tapping on the mentioned event takes the user to that event

Closes: https://github.com/damus-io/damus/issues/2309
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>

Diffstat:
Mdamus/Views/Chat/ChatEventView.swift | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/damus/Views/Chat/ChatEventView.swift b/damus/Views/Chat/ChatEventView.swift @@ -126,6 +126,11 @@ struct ChatEventView: View { let blur_images = should_blur_images(settings: damus_state.settings, contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey) NoteContentView(damus_state: damus_state, event: event, blur_images: blur_images, size: .normal, options: [.truncate_content]) .padding(2) + if let mention = first_eref_mention(ev: event, keypair: damus_state.keypair) { + MentionView(damus_state: damus_state, mention: mention) + .background(DamusColors.adaptableWhite) + .clipShape(RoundedRectangle(cornerSize: CGSize(width: 10, height: 10))) + } } .frame(minWidth: 5, alignment: is_ours ? .trailing : .leading) .padding(10)