Submit on confirm not cancel

This commit is contained in:
Wojciech Kozlowski 2024-09-14 23:09:47 +02:00
parent 4c39988d96
commit 48e19c1f7f

View File

@ -24,14 +24,14 @@ impl IAppInput for AppInputMode {
self.app
}
fn confirm(self) -> Self::APP {
self.cancel()
}
fn cancel(mut self) -> Self::APP {
fn confirm(mut self) -> Self::APP {
if let AppState::Match(state) = &mut self.app {
state.submit_input(self.input)
};
self.app
}
fn cancel(self) -> Self::APP {
self.app
}
}