Skip to content

Commit 6a08d4b

Browse files
committed
ui/note: fix width instabilities because of spacing_mut
TODO: get rid of all spacing_mut in the codebase Fixes: 9ff5753 ("settings: use timed serializer, handle zoom properly...")
1 parent d6d7e4c commit 6a08d4b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

crates/notedeck_chrome/src/android.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use notedeck::Notedeck;
1010
#[tokio::main]
1111
pub async fn android_main(app: AndroidApp) {
1212
//use tracing_logcat::{LogcatMakeWriter, LogcatTag};
13-
use tracing_subscriber::{EnvFilter, prelude::*};
13+
use tracing_subscriber::{prelude::*, EnvFilter};
1414

1515
std::env::set_var("RUST_BACKTRACE", "full");
1616
//std::env::set_var("DAVE_ENDPOINT", "http://ollama.jb55.com/v1");

crates/notedeck_ui/src/note/contents.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
};
55
use notedeck::{JobsCache, RenderableMedia};
66

7-
use egui::{vec2, Color32, Hyperlink, Label, RichText};
7+
use egui::{Color32, Hyperlink, Label, RichText};
88
use nostrdb::{BlockType, Mention, Note, NoteKey, Transaction};
99
use tracing::warn;
1010

@@ -42,8 +42,6 @@ impl<'a, 'd> NoteContents<'a, 'd> {
4242

4343
impl egui::Widget for &mut NoteContents<'_, '_> {
4444
fn ui(self, ui: &mut egui::Ui) -> egui::Response {
45-
ui.spacing_mut().item_spacing = vec2(0.0, 0.0);
46-
4745
if self.options.contains(NoteOptions::ShowNoteClientTop) {
4846
render_client(ui, self.note_context.note_cache, self.note);
4947
}
@@ -160,8 +158,6 @@ pub fn render_note_contents<'a>(
160158
return;
161159
};
162160

163-
ui.spacing_mut().item_spacing = vec2(0.0, 0.0);
164-
165161
'block_loop: for block in blocks.iter(note) {
166162
match block.blocktype() {
167163
BlockType::MentionBech32 => match block.as_mention().unwrap() {

0 commit comments

Comments
 (0)