Skip to content

Commit

Permalink
fix tab note
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Nov 4, 2024
1 parent 9b48841 commit ed11b24
Showing 1 changed file with 29 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ class _NoteCardContainerState extends ConsumerState<NoteCardContainer> {
}

void _navigateToEventViewPage(
BuildContext context, String root, String? scrollIntoView) {
BuildContext context,
String root,
String? scrollIntoView,
) {
Navigator.pushNamed(context, "/nostr/event", arguments: <String, String?>{
"root": root,
"scrollIntoView": scrollIntoView
Expand Down Expand Up @@ -81,30 +84,33 @@ class _NoteCardContainerState extends ConsumerState<NoteCardContainer> {
@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}'),
),
],
),
],
),
);
}
}

0 comments on commit ed11b24

Please sign in to comment.