mirror of
https://github.com/damus-io/notedeck.git
synced 2024-09-19 13:16:34 +00:00
tidy: fix formatting
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
ad9c8f959c
commit
2603d08d1a
@ -1,6 +1,6 @@
|
|||||||
use crate::error::FilterError;
|
use crate::error::FilterError;
|
||||||
use crate::filter::FilterState;
|
|
||||||
use crate::filter;
|
use crate::filter;
|
||||||
|
use crate::filter::FilterState;
|
||||||
use crate::{timeline::Timeline, Error};
|
use crate::{timeline::Timeline, Error};
|
||||||
use enostr::Pubkey;
|
use enostr::Pubkey;
|
||||||
use nostrdb::{Filter, Ndb, Transaction};
|
use nostrdb::{Filter, Ndb, Transaction};
|
||||||
|
@ -70,12 +70,11 @@ impl<'a> TimelineSource<'a> {
|
|||||||
/// Check local subscriptions for new notes and insert them into
|
/// Check local subscriptions for new notes and insert them into
|
||||||
/// timelines (threads, columns)
|
/// timelines (threads, columns)
|
||||||
pub fn poll_notes_into_view(&self, txn: &Transaction, app: &mut Damus) -> Result<()> {
|
pub fn poll_notes_into_view(&self, txn: &Transaction, app: &mut Damus) -> Result<()> {
|
||||||
let sub =
|
let sub = if let Some(sub) = self.sub(app, txn) {
|
||||||
if let Some(sub) = self.sub(app, txn) {
|
sub
|
||||||
sub
|
} else {
|
||||||
} else {
|
return Err(Error::no_active_sub());
|
||||||
return Err(Error::no_active_sub());
|
};
|
||||||
};
|
|
||||||
|
|
||||||
let new_note_ids = app.ndb.poll_for_notes(sub, 100);
|
let new_note_ids = app.ndb.poll_for_notes(sub, 100);
|
||||||
if new_note_ids.is_empty() {
|
if new_note_ids.is_empty() {
|
||||||
|
@ -71,7 +71,8 @@ impl<'a> ThreadView<'a> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// poll for new notes and insert them into our existing notes
|
// poll for new notes and insert them into our existing notes
|
||||||
if let Err(e) = TimelineSource::Thread(root_id).poll_notes_into_view(&txn, self.app) {
|
if let Err(e) = TimelineSource::Thread(root_id).poll_notes_into_view(&txn, self.app)
|
||||||
|
{
|
||||||
error!("Thread::poll_notes_into_view: {e}");
|
error!("Thread::poll_notes_into_view: {e}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user