ui/note: fix width instabilities because of spacing_mut

TODO: get rid of all spacing_mut in the codebase

Fixes: 9ff5753bca ("settings: use timed serializer, handle zoom properly...")
This commit is contained in:
William Casarin
2025-07-31 17:53:40 -07:00
parent d6d7e4c35e
commit 6a08d4b1b2
2 changed files with 2 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ use notedeck::Notedeck;
#[tokio::main] #[tokio::main]
pub async fn android_main(app: AndroidApp) { pub async fn android_main(app: AndroidApp) {
//use tracing_logcat::{LogcatMakeWriter, LogcatTag}; //use tracing_logcat::{LogcatMakeWriter, LogcatTag};
use tracing_subscriber::{EnvFilter, prelude::*}; use tracing_subscriber::{prelude::*, EnvFilter};
std::env::set_var("RUST_BACKTRACE", "full"); std::env::set_var("RUST_BACKTRACE", "full");
//std::env::set_var("DAVE_ENDPOINT", "http://ollama.jb55.com/v1"); //std::env::set_var("DAVE_ENDPOINT", "http://ollama.jb55.com/v1");

View File

@@ -4,7 +4,7 @@ use crate::{
}; };
use notedeck::{JobsCache, RenderableMedia}; use notedeck::{JobsCache, RenderableMedia};
use egui::{vec2, Color32, Hyperlink, Label, RichText}; use egui::{Color32, Hyperlink, Label, RichText};
use nostrdb::{BlockType, Mention, Note, NoteKey, Transaction}; use nostrdb::{BlockType, Mention, Note, NoteKey, Transaction};
use tracing::warn; use tracing::warn;
@@ -42,8 +42,6 @@ impl<'a, 'd> NoteContents<'a, 'd> {
impl egui::Widget for &mut NoteContents<'_, '_> { impl egui::Widget for &mut NoteContents<'_, '_> {
fn ui(self, ui: &mut egui::Ui) -> egui::Response { fn ui(self, ui: &mut egui::Ui) -> egui::Response {
ui.spacing_mut().item_spacing = vec2(0.0, 0.0);
if self.options.contains(NoteOptions::ShowNoteClientTop) { if self.options.contains(NoteOptions::ShowNoteClientTop) {
render_client(ui, self.note_context.note_cache, self.note); render_client(ui, self.note_context.note_cache, self.note);
} }
@@ -160,8 +158,6 @@ pub fn render_note_contents<'a>(
return; return;
}; };
ui.spacing_mut().item_spacing = vec2(0.0, 0.0);
'block_loop: for block in blocks.iter(note) { 'block_loop: for block in blocks.iter(note) {
match block.blocktype() { match block.blocktype() {
BlockType::MentionBech32 => match block.as_mention().unwrap() { BlockType::MentionBech32 => match block.as_mention().unwrap() {