Skip to content

Commit

Permalink
thread loading include root note in query
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Sep 22, 2023
1 parent cc5d501 commit 3ea91ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/db/queries/db_note_queries.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ abstract class DbNoteQueries {
.filter()
.kindEqualTo(kind)
.tagsElement((t) => t.typeEqualTo("e").and().valueEqualTo(id))
.or()
.nostr_idEqualTo(id)
.sortByCreated_atDesc()
.build();
}
Expand Down
7 changes: 4 additions & 3 deletions lib/services/nostr/feeds/event_feed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ class EventFeed {

_streamFeed() async {
Stream<List<DbNote>> stream = DbNoteQueries.findRepliesByIdAndByKindStream(
_db,
id: _rootNoteId,
kind: 1);
_db,
id: _rootNoteId,
kind: 1,
);

_subscriptions.add(
stream.listen((event) async {
Expand Down

0 comments on commit 3ea91ae

Please sign in to comment.