viewfilter: add default implementation
This will be used in future commits Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -18,9 +18,11 @@ use std::rc::Rc;
|
|||||||
|
|
||||||
use tracing::{debug, info, warn};
|
use tracing::{debug, info, warn};
|
||||||
|
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
#[derive(Copy, Clone, Eq, PartialEq, Debug, Default)]
|
||||||
pub enum ViewFilter {
|
pub enum ViewFilter {
|
||||||
Notes,
|
Notes,
|
||||||
|
|
||||||
|
#[default]
|
||||||
NotesAndReplies,
|
NotesAndReplies,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,6 +61,7 @@ impl ViewFilter {
|
|||||||
/// are "Notes" and "Notes & Replies". A timeline is associated with a Filter,
|
/// 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
|
/// but a TimelineView is a further filtered view of this Filter that can't
|
||||||
/// be captured by a Filter itself.
|
/// be captured by a Filter itself.
|
||||||
|
#[derive(Default)]
|
||||||
pub struct TimelineView {
|
pub struct TimelineView {
|
||||||
pub notes: Vec<NoteRef>,
|
pub notes: Vec<NoteRef>,
|
||||||
pub selection: i32,
|
pub selection: i32,
|
||||||
|
|||||||
Reference in New Issue
Block a user