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