ui: add note truncation

Truncate notes by default. We still need a show more button though
This commit is contained in:
William Casarin
2025-04-22 10:48:11 -07:00
parent e4658df847
commit c4084a1fb5
4 changed files with 63 additions and 19 deletions

View File

@@ -75,18 +75,24 @@ pub fn render_timeline_route(
}
}
TimelineKind::Thread(id) => ui::ThreadView::new(
timeline_cache,
unknown_ids,
id.selected_or_root(),
note_options,
&accounts.mutefun(),
note_context,
&accounts.get_selected_account().map(|a| (&a.key).into()),
)
.id_source(egui::Id::new(("threadscroll", col)))
.ui(ui)
.map(Into::into),
TimelineKind::Thread(id) => {
// don't truncate thread notes for now, since they are
// default truncated everywher eelse
note_options.set_truncate(false);
ui::ThreadView::new(
timeline_cache,
unknown_ids,
id.selected_or_root(),
note_options,
&accounts.mutefun(),
note_context,
&accounts.get_selected_account().map(|a| (&a.key).into()),
)
.id_source(egui::Id::new(("threadscroll", col)))
.ui(ui)
.map(Into::into)
}
}
}