update to latest nostrdb, adding tag support

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2024-04-07 14:53:50 -07:00
parent 6222a7db63
commit 4526434405
3 changed files with 42 additions and 41 deletions

61
Cargo.lock generated
View File

@ -1022,9 +1022,9 @@ checksum = "9c912193fa5698d4fbc857b831fb96b42215dcf565e06012993a65901299a21f"
[[package]]
name = "ecolor"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb152797942f72b84496eb2ebeff0060240e0bf55096c4525ffa22dd54722d86"
checksum = "20930a432bbd57a6d55e07976089708d4893f3d556cf42a0d79e9e321fa73b10"
dependencies = [
"bytemuck",
"serde",
@ -1032,14 +1032,14 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bcc8e06df6f0a6cf09a3247ff7e85fdfffc28dda4fe5561e05314bf7618a918"
checksum = "020e2ccef6bbcec71dbc542f7eed64a5846fc3076727f5746da8fd307c91bab2"
dependencies = [
"bytemuck",
"cocoa",
"document-features",
"egui 0.27.1",
"egui 0.27.2",
"egui-wgpu",
"egui-winit",
"egui_glow",
@ -1080,13 +1080,13 @@ dependencies = [
[[package]]
name = "egui"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d1b8cc14b0b260aa6bd124ef12c8a94f57ffe8e40aa970f3db710c21bb945f3"
checksum = "584c5d1bf9a67b25778a3323af222dbe1a1feb532190e103901187f92c7fe29a"
dependencies = [
"accesskit",
"ahash",
"epaint 0.27.1",
"epaint 0.27.2",
"log",
"nohash-hasher",
"puffin",
@ -1095,14 +1095,14 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04ee072f7cbd9e03ae4028db1c4a8677fbb4efc4b62feee6563763a6f041c88d"
checksum = "469ff65843f88a702b731a1532b7d03b0e8e96d283e70f3a22b0e06c46cb9b37"
dependencies = [
"bytemuck",
"document-features",
"egui 0.27.1",
"epaint 0.27.1",
"egui 0.27.2",
"epaint 0.27.2",
"log",
"puffin",
"thiserror",
@ -1114,12 +1114,12 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3733435d6788c760bb98ce4cb1b8b7a2d953a3a7b421656ba8b3e014019be3d0"
checksum = "2e3da0cbe020f341450c599b35b92de4af7b00abde85624fd16f09c885573609"
dependencies = [
"arboard",
"egui 0.27.1",
"egui 0.27.2",
"log",
"puffin",
"raw-window-handle 0.6.0",
@ -1131,11 +1131,11 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70edf79855c42e55c357f7f97cd3be9be59cee2585cc39045ce8ff187aa8d4b0"
checksum = "1b78779f35ded1a853786c9ce0b43fe1053e10a21ea3b23ebea411805ce41593"
dependencies = [
"egui 0.27.1",
"egui 0.27.2",
"ehttp 0.5.0",
"enum-map",
"image",
@ -1147,12 +1147,12 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f933e9e64c4d074c78ce71785a5778f648453c2b2a3efd28eea189dac3f19c28"
checksum = "e0e5d975f3c86edc3d35b1db88bb27c15dde7c55d3b5af164968ab5ede3f44ca"
dependencies = [
"bytemuck",
"egui 0.27.1",
"egui 0.27.2",
"egui-winit",
"glow",
"log",
@ -1203,9 +1203,9 @@ checksum = "2386663fafbd043f2cd14f0ded4702deb9348fb7e7bacba9c9087a31b17487f1"
[[package]]
name = "emath"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "555a7cbfcc52c81eb5f8f898190c840fa1c435f67f30b7ef77ce7cf6b7dcd987"
checksum = "e4c3a552cfca14630702449d35f41c84a0d15963273771c6059175a803620f3f"
dependencies = [
"bytemuck",
"serde",
@ -1319,15 +1319,15 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.27.1"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd63c37156e949bda80f7e39cc11508bc34840aecf52180567e67cdb2bf1a5fe"
checksum = "b381f8b149657a4acf837095351839f32cd5c4aec1817fc4df84e18d76334176"
dependencies = [
"ab_glyph",
"ahash",
"bytemuck",
"ecolor 0.27.1",
"emath 0.27.1",
"ecolor 0.27.2",
"emath 0.27.2",
"log",
"nohash-hasher",
"parking_lot",
@ -2587,8 +2587,9 @@ dependencies = [
[[package]]
name = "nostrdb"
version = "0.2.0"
source = "git+https://github.com/damus-io/nostrdb-rs?rev=2675e7244554e40c9ee10d82b42bc647fef4c17d#2675e7244554e40c9ee10d82b42bc647fef4c17d"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59da521fefb12cd1f1f0f26d15a2ab9f38860696f6c0bb674b9830a5bbc75990"
dependencies = [
"bindgen",
"cc",
@ -2608,7 +2609,7 @@ dependencies = [
"base32",
"console_error_panic_hook",
"eframe",
"egui 0.27.1",
"egui 0.27.2",
"egui_extras",
"ehttp 0.2.0",
"enostr",

View File

@ -13,11 +13,11 @@ crate-type = ["lib", "cdylib"]
[dependencies]
#egui-android = { git = "https://github.com/jb55/egui-android.git" }
egui = "0.27.1"
eframe = { version = "0.27.1", default-features = false, features = [ "glow", "wgpu", "android-native-activity" ] }
egui = "0.27.2"
eframe = { version = "0.27.2", default-features = false, features = [ "glow", "wgpu", "android-native-activity" ] }
#eframe = { version = "0.26.0", default-features = false, features = [ "glow", "android-native-activity" ] }
#eframe = "0.22.0"
egui_extras = { version = "0.27.1", features = ["all_loaders"] }
egui_extras = { version = "0.27.2", features = ["all_loaders"] }
ehttp = "0.2.0"
image = { version = "0.24", features = ["jpeg", "png", "webp"] }
log = "0.4.17"
@ -31,7 +31,8 @@ serde_json = "1.0.89"
env_logger = "0.10.0"
puffin_egui = { version = "0.26.0", optional = true }
puffin = { version = "0.19.0", optional = true }
nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "2675e7244554e40c9ee10d82b42bc647fef4c17d" }
#nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "2675e7244554e40c9ee10d82b42bc647fef4c17d" }
nostrdb = "0.3.0"
hex = "0.4.3"
base32 = "0.4.0"
nostr-sdk = "0.29.0"

View File

@ -110,6 +110,9 @@ fn relay_setup(pool: &mut RelayPool, ctx: &egui::Context) {
if let Err(e) = pool.add_url("wss://relay.damus.io".to_string(), wakeup.clone()) {
error!("{:?}", e)
}
if let Err(e) = pool.add_url("wss://pyramid.fiatjaf.com".to_string(), wakeup.clone()) {
error!("{:?}", e)
}
if let Err(e) = pool.add_url("wss://nos.lol".to_string(), wakeup.clone()) {
error!("{:?}", e)
}
@ -253,16 +256,12 @@ fn poll_notes_for_timeline<'a>(
let new_refs = new_note_ids
.iter()
.map(|key| {
let note_key = NoteKey::new(*key);
let note = damus
.ndb
.get_note_by_key(&txn, note_key)
.expect("no note??");
let note = damus.ndb.get_note_by_key(&txn, *key).expect("no note??");
let _ = get_unknown_note_pubkeys(&damus.ndb, txn, &note, note_key, pubkeys);
let _ = get_unknown_note_pubkeys(&damus.ndb, txn, &note, *key, pubkeys);
NoteRef {
key: NoteKey::new(*key),
key: *key,
created_at: note.created_at(),
}
})