notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 4a5a9d431940ec4ed4cd5be765ea27ff563ed343
parent 088d012c93c8307a2a155489aeb864f386a90b4c
Author: William Casarin <jb55@jb55.com>
Date:   Sat,  9 Mar 2024 01:21:07 -0800

black background

Diffstat:
MCargo.lock | 10++++++++++
MCargo.toml | 1+
Msrc/app.rs | 13++++++++-----
3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -844,6 +844,7 @@ dependencies = [ "objc", "parking_lot", "percent-encoding", + "pollster", "puffin", "raw-window-handle 0.5.2", "raw-window-handle 0.6.0", @@ -853,6 +854,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "web-time", + "wgpu", "winapi", "winit", ] @@ -2397,6 +2399,12 @@ dependencies = [ ] [[package]] +name = "pollster" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" + +[[package]] name = "powerfmt" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3811,6 +3819,7 @@ dependencies = [ "cfg_aliases", "js-sys", "log", + "naga", "parking_lot", "profiling", "raw-window-handle 0.6.0", @@ -3860,6 +3869,7 @@ dependencies = [ "arrayvec", "ash", "bitflags 2.4.2", + "block", "cfg_aliases", "core-graphics-types", "glow", diff --git a/Cargo.toml b/Cargo.toml @@ -14,6 +14,7 @@ crate-type = ["lib", "cdylib"] #egui-android = { git = "https://github.com/jb55/egui-android.git" } egui = "0.26.0" eframe = { version = "0.26.0", 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.26.0", features = ["all_loaders"] } ehttp = "0.2.0" diff --git a/src/app.rs b/src/app.rs @@ -13,8 +13,8 @@ use std::borrow::Cow; use egui::widgets::Spinner; use egui::{ - Color32, Context, Frame, Hyperlink, Image, Label, Margin, RichText, Sense, Style, - TextureHandle, Vec2, Visuals, + CollapsingHeader, Color32, Context, Frame, Hyperlink, Image, Label, Margin, RichText, Sense, + Style, TextureHandle, Vec2, Visuals, }; use enostr::{ClientMessage, Filter, Pubkey, RelayEvent, RelayMessage}; @@ -300,7 +300,7 @@ fn setup_initial_nostrdb_subs(damus: &mut Damus) -> Result<()> { .collect(); damus.timelines[0].subscription = Some(damus.ndb.subscribe(filters.clone())?); let txn = Transaction::new(&damus.ndb)?; - let res = damus.ndb.query(&txn, filters, 200)?; + let res = damus.ndb.query(&txn, filters, 100)?; damus.timelines[0].notes = res .iter() .map(|qr| NoteRef { @@ -642,7 +642,7 @@ fn render_note_contents( let blocks = if let Ok(blocks) = damus.ndb.get_blocks_by_key(txn, note_key) { blocks } else { - warn!("note content '{}'", note.content()); + warn!("missing note content blocks? '{}'", note.content()); ui.weak(note.content()); return; }; @@ -755,6 +755,8 @@ fn render_note(ui: &mut egui::Ui, damus: &mut Damus, note_key: NoteKey) -> Resul }); render_note_contents(ui, damus, &txn, &note, note_key); + + //render_note_actionbar(ui, damus); }) }); }); @@ -859,7 +861,8 @@ fn set_app_style(style: &mut Style) { visuals.hyperlink_color = PURPLE; if visuals.dark_mode { visuals.override_text_color = Some(egui::Color32::from_rgb(250, 250, 250)); - visuals.panel_fill = egui::Color32::from_rgb(31, 31, 31); + //visuals.panel_fill = egui::Color32::from_rgb(31, 31, 31); + visuals.panel_fill = egui::Color32::from_rgb(0, 0, 0); //visuals.override_text_color = Some(egui::Color32::from_rgb(170, 177, 190)); //visuals.panel_fill = egui::Color32::from_rgb(40, 44, 52); } else {