notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit bf57e3b7803d4e0a124ba215e9e5b4368652a91c
parent 86f87fa0a522b0e15b0fad17ec32371c34692da0
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 16 Jul 2024 12:30:39 -0700

viewfilter: add default implementation

This will be used in future commits

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/timeline.rs | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/timeline.rs b/src/timeline.rs @@ -18,9 +18,11 @@ use std::rc::Rc; use tracing::{debug, info, warn}; -#[derive(Copy, Clone, Eq, PartialEq, Debug)] +#[derive(Copy, Clone, Eq, PartialEq, Debug, Default)] pub enum ViewFilter { Notes, + + #[default] NotesAndReplies, } @@ -59,6 +61,7 @@ impl ViewFilter { /// are "Notes" and "Notes & Replies". A timeline is associated with a Filter, /// but a TimelineView is a further filtered view of this Filter that can't /// be captured by a Filter itself. +#[derive(Default)] pub struct TimelineView { pub notes: Vec<NoteRef>, pub selection: i32,