ui: fix broken note previews

Also made the options more clear

Fixes: https://github.com/damus-io/notedeck/issues/959
Fixes: b6348b1507 ("note/options: simplify flag logic")
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-14 14:04:49 -07:00
parent b5d56f7831
commit c402320ad3
3 changed files with 9 additions and 9 deletions

View File

@@ -133,7 +133,7 @@ pub fn render_note_contents(
let mut current_len: usize = 0;
let truncate_len = 280;
if !options.has(NoteOptions::Preview) {
if !options.has(NoteOptions::HasNotePreviews) {
// need this for the rect to take the full width of the column
let _ = ui.allocate_at_least(egui::vec2(ui.available_width(), 0.0), egui::Sense::click());
}
@@ -183,11 +183,11 @@ pub fn render_note_contents(
}
}
Mention::Note(note) if options.has(NoteOptions::Preview) => {
Mention::Note(note) if options.has(NoteOptions::HasNotePreviews) => {
inline_note = Some((note.id(), block.as_str()));
}
Mention::Event(note) if options.has(NoteOptions::Preview) => {
Mention::Event(note) if options.has(NoteOptions::HasNotePreviews) => {
inline_note = Some((note.id(), block.as_str()));
}