@@ -8,6 +8,7 @@ use crate::{
|
||||
timeline::TimelineId,
|
||||
ui::{
|
||||
self,
|
||||
add_column::AddColumnResponse,
|
||||
note::{
|
||||
post::{PostAction, PostResponse},
|
||||
QuoteRepostView,
|
||||
@@ -26,13 +27,14 @@ pub enum TimelineRoute {
|
||||
Quote(NoteId),
|
||||
}
|
||||
|
||||
pub enum TimelineRouteResponse {
|
||||
pub enum AfterRouteExecution {
|
||||
Post(PostResponse),
|
||||
AddColumn(AddColumnResponse),
|
||||
}
|
||||
|
||||
impl TimelineRouteResponse {
|
||||
impl AfterRouteExecution {
|
||||
pub fn post(post: PostResponse) -> Self {
|
||||
TimelineRouteResponse::Post(post)
|
||||
AfterRouteExecution::Post(post)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +52,7 @@ pub fn render_timeline_route(
|
||||
col: usize,
|
||||
textmode: bool,
|
||||
ui: &mut egui::Ui,
|
||||
) -> Option<TimelineRouteResponse> {
|
||||
) -> Option<AfterRouteExecution> {
|
||||
match route {
|
||||
TimelineRoute::Timeline(timeline_id) => {
|
||||
if let Some(bar_action) =
|
||||
@@ -111,7 +113,7 @@ pub fn render_timeline_route(
|
||||
});
|
||||
}
|
||||
|
||||
Some(TimelineRouteResponse::post(response.inner))
|
||||
Some(AfterRouteExecution::post(response.inner))
|
||||
}
|
||||
|
||||
TimelineRoute::Quote(id) => {
|
||||
@@ -140,7 +142,7 @@ pub fn render_timeline_route(
|
||||
np.to_quote(seckey, ¬e)
|
||||
});
|
||||
}
|
||||
Some(TimelineRouteResponse::post(response.inner))
|
||||
Some(AfterRouteExecution::post(response.inner))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user