initial navigation

This commit is contained in:
William Casarin
2024-06-04 01:51:30 -05:00
parent bff0f3f628
commit 0dd33c90e7
16 changed files with 528 additions and 576 deletions

View File

@@ -1,9 +1,24 @@
//use nostrdb::NoteKey;
use enostr::NoteId;
use std::fmt;
/// App routing. These describe different places you can go inside Notedeck.
#[derive(Clone, Debug)]
pub enum Route {
/*
Timeline(String),
ManageAccount,
Thread(NoteKey),
*/
Thread(NoteId),
Reply(NoteId),
Relays,
}
impl fmt::Display for Route {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Route::ManageAccount => write!(f, "Manage Account"),
Route::Timeline(name) => write!(f, "{}", name),
Route::Thread(_id) => write!(f, "Thread"),
Route::Reply(_id) => write!(f, "Reply"),
Route::Relays => write!(f, "Relays"),
}
}
}