commit 36845c630589b8a1ebb3b7cf40c0313ca4841656
parent 3b735d0ef9709832ec26dc2ecaf8abf353569bf1
Author: kernelkind <kernelkind@gmail.com>
Date: Sat, 4 Oct 2025 17:29:54 -0400
route: add `RepostDecision`
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
4 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/crates/notedeck_columns/src/app.rs b/crates/notedeck_columns/src/app.rs
@@ -789,6 +789,7 @@ fn should_show_compose_button(decks: &DecksCache, accounts: &Accounts) -> bool {
Route::EditDeck(_) => false,
Route::Wallet(_) => false,
Route::CustomizeZapAmount(_) => false,
+ Route::RepostDecision(_) => false,
}
}
diff --git a/crates/notedeck_columns/src/nav.rs b/crates/notedeck_columns/src/nav.rs
@@ -941,6 +941,9 @@ fn render_nav_body(
)))
})
}
+ Route::RepostDecision(note_id) => {
+ unimplemented!()
+ }
}
}
diff --git a/crates/notedeck_columns/src/route.rs b/crates/notedeck_columns/src/route.rs
@@ -18,6 +18,7 @@ pub enum Route {
Accounts(AccountsRoute),
Reply(NoteId),
Quote(NoteId),
+ RepostDecision(NoteId),
Relays,
Settings,
ComposeNote,
@@ -132,6 +133,10 @@ impl Route {
writer.write_token("wallet");
}
Route::CustomizeZapAmount(_) => writer.write_token("customize zap amount"),
+ Route::RepostDecision(note_id) => {
+ writer.write_token("repost_decision");
+ writer.write_token(¬e_id.hex());
+ }
}
}
@@ -185,6 +190,14 @@ impl Route {
},
|p| {
p.parse_all(|p| {
+ p.parse_token("repost_decision")?;
+ let note_id = NoteId::from_hex(p.pull_token()?)
+ .map_err(|_| ParseError::HexDecodeFailed)?;
+ Ok(Route::RepostDecision(note_id))
+ })
+ },
+ |p| {
+ p.parse_all(|p| {
p.parse_token("quote")?;
Ok(Route::Quote(NoteId::new(tokenator::parse_hex_id(p)?)))
})
@@ -358,6 +371,11 @@ impl Route {
"Customize Zap Amount",
"Column title for zap amount customization"
)),
+ Route::RepostDecision(_) => ColumnTitle::formatted(tr!(
+ i18n,
+ "Repost",
+ "Column title for deciding the type of repost"
+ )),
}
}
}
diff --git a/crates/notedeck_columns/src/ui/column/header.rs b/crates/notedeck_columns/src/ui/column/header.rs
@@ -491,6 +491,7 @@ impl<'a> NavTitle<'a> {
Route::Thread(thread_selection) => {
Some(self.thread_pfp(ui, thread_selection, pfp_size))
}
+ Route::RepostDecision(_) => None,
}
}