From ed11b24249560ffe5fe1865d3181a7e1c5ef5030 Mon Sep 17 00:00:00 2001 From: LeoLox <58687994+leo-lox@users.noreply.github.com> Date: Mon, 4 Nov 2024 16:50:56 +0100 Subject: [PATCH] fix tab note --- .../note_card/note_card_container.dart | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/lib/presentation_layer/components/note_card/note_card_container.dart b/lib/presentation_layer/components/note_card/note_card_container.dart index 37e5e098..ec7c925c 100644 --- a/lib/presentation_layer/components/note_card/note_card_container.dart +++ b/lib/presentation_layer/components/note_card/note_card_container.dart @@ -42,7 +42,10 @@ class _NoteCardContainerState extends ConsumerState { } void _navigateToEventViewPage( - BuildContext context, String root, String? scrollIntoView) { + BuildContext context, + String root, + String? scrollIntoView, + ) { Navigator.pushNamed(context, "/nostr/event", arguments: { "root": root, "scrollIntoView": scrollIntoView @@ -81,30 +84,33 @@ class _NoteCardContainerState extends ConsumerState { @override Widget build(BuildContext context) { final note = widget.note; - return Column( - children: [ - // check if reply - if (note.getTagEvents.isNotEmpty) - // for myNote.getTagPubkeys - Padding( - padding: const EdgeInsets.only(left: 15.0), - child: InReplyTo( - key: ValueKey('in-reply-to-${note.id}'), - myNote: note, + return GestureDetector( + onTap: () { + _onNoteTab(context, note); + }, + child: Container( + color: Palette.background, + child: Column( + children: [ + // check if reply + if (note.getTagEvents.isNotEmpty) + // for myNote.getTagPubkeys + Padding( + padding: const EdgeInsets.only(left: 15.0), + child: InReplyTo( + key: ValueKey('in-reply-to-${note.id}'), + myNote: note, + ), + ), + + NoteCard( + note: note, + myMetadata: myUserNoteMetadata, + key: ValueKey('note-${note.id}'), ), - ), - - GestureDetector( - onTap: () { - _onNoteTab(context, note); - }, - child: NoteCard( - note: note, - myMetadata: myUserNoteMetadata, - key: ValueKey('note-${note.id}'), - ), + ], ), - ], + ), ); } }