notedeck

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

commit 37ab24c79b46a44bc79358db5bfe52d2de5e36b8
parent 3b3507c3f99da463bf38375d3a3c1d194b53f83e
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 26 Jan 2026 16:15:35 -0800

dave: fix diff UI issues

- Remove nested horizontal layout in file_path_header (caller already
  provides horizontal context)
- Remove unused filename() method

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/file_update.rs | 7-------
Mcrates/notedeck_dave/src/ui/diff.rs | 8+++-----
2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/crates/notedeck_dave/src/file_update.rs b/crates/notedeck_dave/src/file_update.rs @@ -100,11 +100,4 @@ impl FileUpdate { } } - /// Get the filename portion of the path for display - pub fn filename(&self) -> &str { - self.file_path - .rsplit('/') - .next() - .unwrap_or(&self.file_path) - } } diff --git a/crates/notedeck_dave/src/ui/diff.rs b/crates/notedeck_dave/src/ui/diff.rs @@ -85,15 +85,13 @@ fn render_diff_lines(lines: &[DiffLine], update_type: &FileUpdateType, ui: &mut } } -/// Render the file path header +/// Render the file path header (call within a horizontal layout) pub fn file_path_header(update: &FileUpdate, ui: &mut Ui) { let type_label = match &update.update_type { FileUpdateType::Edit { .. } => "Edit", FileUpdateType::Write { .. } => "Write", }; - ui.horizontal(|ui| { - ui.label(RichText::new(type_label).strong()); - ui.label(RichText::new(&update.file_path).monospace()); - }); + ui.label(RichText::new(type_label).strong()); + ui.label(RichText::new(&update.file_path).monospace()); }