timeline: refactor tabs into TimelineView

TimelineView is a filtered view of a timeline. We will use this for
future tab rendering. We also introduce a new "selection" concept for
selecting notes on different timeline views. This is in preparation for
vim keybindings.
This commit is contained in:
William Casarin
2024-05-17 21:32:37 -05:00
parent 8663851e7e
commit a8693a2bd3
4 changed files with 156 additions and 30 deletions

View File

@@ -4,7 +4,7 @@ pub mod options;
pub use contents::NoteContents;
pub use options::NoteOptions;
use crate::{colors, ui, ui::is_mobile, Damus};
use crate::{colors, notecache::CachedNote, ui, ui::is_mobile, Damus};
use egui::{Label, RichText, Sense};
use nostrdb::{NoteKey, Transaction};
use std::hash::{Hash, Hasher};
@@ -308,7 +308,7 @@ fn secondary_label(ui: &mut egui::Ui, s: impl Into<String>) {
fn render_reltime(
ui: &mut egui::Ui,
note_cache: &mut crate::notecache::NoteCache,
note_cache: &mut CachedNote,
before: bool,
) -> egui::InnerResponse<()> {
#[cfg(feature = "profiling")]