patch/issue-select: Improve app exit

This commit is contained in:
Erik Kundt
2024-02-05 14:40:06 +01:00
parent b230a33f6f
commit e39645bbec
2 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -111,7 +111,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
code: Key::Enter, ..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", IssueOperation::Show))
.with_operation(IssueOperation::Show.to_string())
.with_id(IssueId::from(id));
Message::Quit(Some(exit))
}),
@@ -120,7 +120,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", IssueOperation::Delete))
.with_operation(IssueOperation::Delete.to_string())
.with_id(IssueId::from(id));
Message::Quit(Some(exit))
}),
@@ -129,7 +129,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", IssueOperation::Edit))
.with_operation(IssueOperation::Edit.to_string())
.with_id(IssueId::from(id));
Message::Quit(Some(exit))
}),
@@ -138,7 +138,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", IssueOperation::Comment))
.with_operation(IssueOperation::Comment.to_string())
.with_id(IssueId::from(id));
Message::Quit(Some(exit))
}),
+5 -5
View File
@@ -111,7 +111,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
code: Key::Enter, ..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", PatchOperation::Show))
.with_operation(PatchOperation::Show.to_string())
.with_id(PatchId::from(id));
Message::Quit(Some(exit))
}),
@@ -120,7 +120,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", PatchOperation::Checkout))
.with_operation(PatchOperation::Checkout.to_string())
.with_id(PatchId::from(id));
Message::Quit(Some(exit))
}),
@@ -129,7 +129,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", PatchOperation::Delete))
.with_operation(PatchOperation::Delete.to_string())
.with_id(PatchId::from(id));
Message::Quit(Some(exit))
}),
@@ -138,7 +138,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", PatchOperation::Edit))
.with_operation(PatchOperation::Edit.to_string())
.with_id(PatchId::from(id));
Message::Quit(Some(exit))
}),
@@ -147,7 +147,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
..
}) => submit().map(|id| {
let exit = SelectionExit::default()
.with_operation(format!("{}", PatchOperation::Comment))
.with_operation(PatchOperation::Comment.to_string())
.with_id(PatchId::from(id));
Message::Quit(Some(exit))
}),