feat: refine the search bar (#207)

* update deps

* refactor the search cancellation

* .

* .
This commit is contained in:
reya
2025-11-22 07:25:08 +07:00
committed by GitHub
parent a6e00b47d8
commit 14c36e4731
11 changed files with 271 additions and 344 deletions

View File

@@ -69,9 +69,15 @@ impl NostrRegistry {
timeout: Duration::from_secs(600),
});
// Construct the lmdb
let lmdb = cx.background_executor().block(async move {
let path = config_dir().join("nostr");
NostrLMDB::open(path)
.await
.expect("Failed to initialize database")
});
// Construct the nostr client
let path = config_dir().join("nostr");
let lmdb = NostrLMDB::open(path).expect("Failed to initialize database");
let client = ClientBuilder::default().database(lmdb).opts(opts).build();
let tracker = Arc::new(RwLock::new(EventTracker::default()));