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

@@ -91,7 +91,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
jobs: &'a mut JobsCache,
) -> Self {
flags.set(NoteOptions::ActionBar, true);
flags.set(NoteOptions::NotePreviews, true);
flags.set(NoteOptions::HasNotePreviews, true);
let framed = false;
let parent: Option<NoteKey> = None;
@@ -154,7 +154,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
}
pub fn note_previews(mut self, enable: bool) -> Self {
self.options_mut().set(NoteOptions::NotePreviews, enable);
self.options_mut().set(NoteOptions::HasNotePreviews, enable);
self
}
@@ -187,7 +187,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
}
pub fn is_preview(mut self, is_preview: bool) -> Self {
self.options_mut().set(NoteOptions::Preview, is_preview);
self.options_mut().set(NoteOptions::IsPreview, is_preview);
self
}