mirror of
https://github.com/damus-io/notedeck.git
synced 2024-09-18 21:03:31 +00:00
thread: warn when we return 0 notes
This is a bug Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
4b644bee32
commit
38626520c1
@ -4,7 +4,7 @@ use crate::Error;
|
||||
use nostrdb::{Filter, FilterBuilder, Ndb, Subscription, Transaction};
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use tracing::debug;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Thread {
|
||||
@ -173,7 +173,12 @@ impl Threads {
|
||||
vec![]
|
||||
};
|
||||
|
||||
debug!("found thread with {} notes", notes.len());
|
||||
if notes.is_empty() {
|
||||
warn!("thread query returned 0 notes? ")
|
||||
} else {
|
||||
debug!("found thread with {} notes", notes.len());
|
||||
}
|
||||
|
||||
self.root_id_to_thread
|
||||
.insert(root_id.to_owned(), Thread::new(notes));
|
||||
ThreadResult::Fresh(self.root_id_to_thread.get_mut(root_id).unwrap())
|
||||
|
Loading…
Reference in New Issue
Block a user