remove PostActionExecutor

Just use PostAction::execute

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-09-26 08:00:12 -07:00
parent 13d6873eb1
commit dbb164970c
4 changed files with 31 additions and 38 deletions

View File

@@ -4,12 +4,14 @@ use crate::{
draft::Drafts,
imgcache::ImageCache,
notecache::NoteCache,
post_action_executor::PostActionExecutor,
thread::Threads,
timeline::TimelineId,
ui::{
self,
note::{post::PostResponse, QuoteRepostView},
note::{
post::{PostAction, PostResponse},
QuoteRepostView,
},
},
};
@@ -59,9 +61,7 @@ pub fn render_timeline_route(
ui::timeline::postbox_view(ndb, kp, draft, img_cache, note_cache, ui);
if let Some(action) = response.action {
PostActionExecutor::execute(kp, &action, pool, draft, |np, seckey| {
np.to_note(seckey)
});
PostAction::execute(kp, &action, pool, draft, |np, seckey| np.to_note(seckey));
}
}
@@ -118,7 +118,7 @@ pub fn render_timeline_route(
});
if let Some(action) = &response.inner.action {
PostActionExecutor::execute(poster, action, pool, draft, |np, seckey| {
PostAction::execute(poster, action, pool, draft, |np, seckey| {
np.to_reply(seckey, &note)
});
}
@@ -148,7 +148,7 @@ pub fn render_timeline_route(
});
if let Some(action) = &response.inner.action {
PostActionExecutor::execute(poster, action, pool, draft, |np, seckey| {
PostAction::execute(poster, action, pool, draft, |np, seckey| {
np.to_quote(seckey, &note)
});
}