Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
bin: Rename event handling function
Erik Kundt committed 2 years ago
commit 8df76a295d894527083cbad23ebcf13a01b451f2
parent 0738ec7543410da0911cadc46f4a7b73235af4ec
3 files changed +21 -21
modified bin/commands/inbox/select/ui.rs
@@ -205,9 +205,9 @@ where
        self.shortcuts.update(state);
    }

-
    fn handle_key_event(&mut self, key: Key) {
+
    fn handle_event(&mut self, key: Key) {
        if self.props.show_search {
-
            self.search.handle_key_event(key);
+
            self.search.handle_event(key);
        } else {
            match key {
                Key::Esc | Key::Ctrl('c') => {
@@ -257,7 +257,7 @@ where
                        });
                }
                _ => {
-
                    self.notifications.handle_key_event(key);
+
                    self.notifications.handle_event(key);
                }
            }
        }
@@ -438,7 +438,7 @@ impl<B: Backend> View<State, Action> for Search<B> {
        self.input.update(state);
    }

-
    fn handle_key_event(&mut self, key: termion::event::Key) {
+
    fn handle_event(&mut self, key: termion::event::Key) {
        match key {
            Key::Esc => {
                let _ = self.base.action_tx.send(Action::CloseSearch);
@@ -447,7 +447,7 @@ impl<B: Backend> View<State, Action> for Search<B> {
                let _ = self.base.action_tx.send(Action::ApplySearch);
            }
            _ => {
-
                self.input.handle_key_event(key);
+
                self.input.handle_event(key);
            }
        }
    }
@@ -589,7 +589,7 @@ where
        self.content.update(state);
    }

-
    fn handle_key_event(&mut self, key: termion::event::Key) {
+
    fn handle_event(&mut self, key: termion::event::Key) {
        match key {
            Key::Esc | Key::Ctrl('c') => {
                let _ = self.base.action_tx.send(Action::Exit { selection: None });
@@ -598,7 +598,7 @@ where
                let _ = self.base.action_tx.send(Action::LeavePage);
            }
            _ => {
-
                self.content.handle_key_event(key);
+
                self.content.handle_event(key);
            }
        }
    }
modified bin/commands/issue/select/ui.rs
@@ -208,9 +208,9 @@ where
        self.shortcuts.update(state);
    }

-
    fn handle_key_event(&mut self, key: Key) {
+
    fn handle_event(&mut self, key: Key) {
        if self.props.show_search {
-
            self.search.handle_key_event(key);
+
            self.search.handle_event(key);
        } else {
            match key {
                Key::Esc | Key::Ctrl('c') => {
@@ -262,7 +262,7 @@ where
                        });
                }
                _ => {
-
                    self.issues.handle_key_event(key);
+
                    self.issues.handle_event(key);
                }
            }
        }
@@ -457,7 +457,7 @@ impl<B: Backend> View<State, Action> for Search<B> {
        self.input.update(state);
    }

-
    fn handle_key_event(&mut self, key: termion::event::Key) {
+
    fn handle_event(&mut self, key: termion::event::Key) {
        match key {
            Key::Esc => {
                let _ = self.base.action_tx.send(Action::CloseSearch);
@@ -466,7 +466,7 @@ impl<B: Backend> View<State, Action> for Search<B> {
                let _ = self.base.action_tx.send(Action::ApplySearch);
            }
            _ => {
-
                self.input.handle_key_event(key);
+
                self.input.handle_event(key);
            }
        }
    }
@@ -608,7 +608,7 @@ where
        self.content.update(state);
    }

-
    fn handle_key_event(&mut self, key: termion::event::Key) {
+
    fn handle_event(&mut self, key: termion::event::Key) {
        match key {
            Key::Esc | Key::Ctrl('c') => {
                let _ = self.base.action_tx.send(Action::Exit { selection: None });
@@ -617,7 +617,7 @@ where
                let _ = self.base.action_tx.send(Action::LeavePage);
            }
            _ => {
-
                self.content.handle_key_event(key);
+
                self.content.handle_event(key);
            }
        }
    }
modified bin/commands/patch/select/ui.rs
@@ -209,9 +209,9 @@ where
        self.shortcuts.update(state);
    }

-
    fn handle_key_event(&mut self, key: Key) {
+
    fn handle_event(&mut self, key: Key) {
        if self.props.show_search {
-
            self.search.handle_key_event(key);
+
            self.search.handle_event(key);
        } else {
            match key {
                Key::Esc | Key::Ctrl('c') => {
@@ -280,7 +280,7 @@ where
                        });
                }
                _ => {
-
                    self.patches.handle_key_event(key);
+
                    self.patches.handle_event(key);
                }
            }
        }
@@ -485,7 +485,7 @@ impl<B: Backend> View<State, Action> for Search<B> {
        self.input.update(state);
    }

-
    fn handle_key_event(&mut self, key: termion::event::Key) {
+
    fn handle_event(&mut self, key: termion::event::Key) {
        match key {
            Key::Esc => {
                let _ = self.base.action_tx.send(Action::CloseSearch);
@@ -494,7 +494,7 @@ impl<B: Backend> View<State, Action> for Search<B> {
                let _ = self.base.action_tx.send(Action::ApplySearch);
            }
            _ => {
-
                self.input.handle_key_event(key);
+
                self.input.handle_event(key);
            }
        }
    }
@@ -636,7 +636,7 @@ where
        self.content.update(state);
    }

-
    fn handle_key_event(&mut self, key: termion::event::Key) {
+
    fn handle_event(&mut self, key: termion::event::Key) {
        match key {
            Key::Esc | Key::Ctrl('c') => {
                let _ = self.base.action_tx.send(Action::Exit { selection: None });
@@ -645,7 +645,7 @@ where
                let _ = self.base.action_tx.send(Action::LeavePage);
            }
            _ => {
-
                self.content.handle_key_event(key);
+
                self.content.handle_event(key);
            }
        }
    }