mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-17 16:54:18 +01:00
add RenderNavAction::RepostAction & render RepostDecisionView
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ use crate::{
|
|||||||
decks::{Deck, DecksAction, DecksCache},
|
decks::{Deck, DecksAction, DecksCache},
|
||||||
options::AppOptions,
|
options::AppOptions,
|
||||||
profile::{ProfileAction, SaveProfileChanges},
|
profile::{ProfileAction, SaveProfileChanges},
|
||||||
|
repost::RepostAction,
|
||||||
route::{Route, Router, SingletonRouter},
|
route::{Route, Router, SingletonRouter},
|
||||||
subscriptions::Subscriptions,
|
subscriptions::Subscriptions,
|
||||||
timeline::{
|
timeline::{
|
||||||
@@ -21,6 +22,7 @@ use crate::{
|
|||||||
edit_deck::{EditDeckResponse, EditDeckView},
|
edit_deck::{EditDeckResponse, EditDeckView},
|
||||||
note::{custom_zap::CustomZapView, NewPostAction, PostAction, PostType},
|
note::{custom_zap::CustomZapView, NewPostAction, PostAction, PostType},
|
||||||
profile::EditProfileView,
|
profile::EditProfileView,
|
||||||
|
repost::RepostDecisionView,
|
||||||
search::{FocusState, SearchView},
|
search::{FocusState, SearchView},
|
||||||
settings::SettingsAction,
|
settings::SettingsAction,
|
||||||
support::SupportView,
|
support::SupportView,
|
||||||
@@ -68,6 +70,7 @@ pub enum RenderNavAction {
|
|||||||
WalletAction(WalletAction),
|
WalletAction(WalletAction),
|
||||||
RelayAction(RelayAction),
|
RelayAction(RelayAction),
|
||||||
SettingsAction(SettingsAction),
|
SettingsAction(SettingsAction),
|
||||||
|
RepostAction(RepostAction),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum SwitchingAction {
|
pub enum SwitchingAction {
|
||||||
@@ -524,6 +527,9 @@ fn process_render_nav_action(
|
|||||||
RenderNavAction::SettingsAction(action) => {
|
RenderNavAction::SettingsAction(action) => {
|
||||||
action.process_settings_action(app, ctx.settings, ctx.i18n, ctx.img_cache, ui.ctx())
|
action.process_settings_action(app, ctx.settings, ctx.i18n, ctx.img_cache, ui.ctx())
|
||||||
}
|
}
|
||||||
|
RenderNavAction::RepostAction(action) => {
|
||||||
|
action.process(ctx.ndb, &ctx.accounts.get_selected_account().key, ctx.pool)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(action) = router_action {
|
if let Some(action) = router_action {
|
||||||
@@ -942,7 +948,8 @@ fn render_nav_body(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
Route::RepostDecision(note_id) => {
|
Route::RepostDecision(note_id) => {
|
||||||
unimplemented!()
|
BodyResponse::output(RepostDecisionView::new(note_id).show(ui))
|
||||||
|
.map_output(RenderNavAction::RepostAction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user