mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
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:
@@ -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");
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user