chore: refactor out graph created event
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-05-12 21:11:08 +02:00
parent 9bb5bc9e87
commit 64d59e069f
3 changed files with 12 additions and 25 deletions

View File

@@ -21,8 +21,7 @@ pub enum Msg {
Edit(EditMsg),
GraphUpdated(GraphUpdatedEvent),
GraphUpdated(IOEvent<GraphItem>),
ItemCreated(IOEvent<()>),
ItemUpdated(IOEvent<()>),
SectionCreated(IOEvent<()>),
@@ -37,14 +36,6 @@ pub enum IOEvent<T> {
Failure(String),
}
#[derive(Debug)]
pub enum GraphUpdatedEvent {
Initiated,
Optimistic(GraphItem),
Success(GraphItem),
Failure(String),
}
impl IntoCommand for Msg {
fn into_command(self) -> crate::commands::Command {
Command::new(|_| Some(self))