fix event order

This commit is contained in:
Takayuki Maeda 2021-09-17 14:59:46 +09:00
parent c001bf40a5
commit 5e4c9b1734

View File

@ -332,14 +332,12 @@ impl App {
} }
} }
Focus::DabataseList => { Focus::DabataseList => {
let state = self.databases.event(key)?; if self.databases.event(key)?.is_consumed() {
if key == self.config.key_config.enter && self.databases.tree_focused() {
self.update_table().await?;
return Ok(EventState::Consumed); return Ok(EventState::Consumed);
} }
if state.is_consumed() { if key == self.config.key_config.enter && self.databases.tree_focused() {
self.update_table().await?;
return Ok(EventState::Consumed); return Ok(EventState::Consumed);
} }
} }