mirror of
https://github.com/TaKO8Ki/gobang
synced 2024-11-11 07:10:31 +00:00
handle extend shorten widget width event after component events
This commit is contained in:
parent
fa3b32d6d2
commit
46e2f3081c
11
src/app.rs
11
src/app.rs
@ -315,10 +315,6 @@ impl App {
|
|||||||
return Ok(EventState::Consumed);
|
return Ok(EventState::Consumed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.expand_or_shorten_widget_width(key)?.is_consumed() {
|
|
||||||
return Ok(EventState::Consumed);
|
|
||||||
};
|
|
||||||
|
|
||||||
match self.focus {
|
match self.focus {
|
||||||
Focus::ConnectionList => {
|
Focus::ConnectionList => {
|
||||||
if self.connections.event(key)?.is_consumed() {
|
if self.connections.event(key)?.is_consumed() {
|
||||||
@ -439,10 +435,15 @@ impl App {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.extend_or_shorten_widget_width(key)?.is_consumed() {
|
||||||
|
return Ok(EventState::Consumed);
|
||||||
|
};
|
||||||
|
|
||||||
Ok(EventState::NotConsumed)
|
Ok(EventState::NotConsumed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn expand_or_shorten_widget_width(&mut self, key: Key) -> anyhow::Result<EventState> {
|
fn extend_or_shorten_widget_width(&mut self, key: Key) -> anyhow::Result<EventState> {
|
||||||
if key
|
if key
|
||||||
== self
|
== self
|
||||||
.config
|
.config
|
||||||
|
Loading…
Reference in New Issue
Block a user