diff --git a/src/app/browser/window/tab/item/page/search.rs b/src/app/browser/window/tab/item/page/search.rs index 13baf400..521e622f 100644 --- a/src/app/browser/window/tab/item/page/search.rs +++ b/src/app/browser/window/tab/item/page/search.rs @@ -58,10 +58,6 @@ impl Search { // Actions - pub fn escape(&self) { - self.hide() - } - pub fn show(&self) { if self.subject.borrow().is_some() { self.form.show(); @@ -87,9 +83,6 @@ impl Search { /// * currently supports [TextView](https://docs.gtk.org/gtk4/class.TextView.html) only pub fn update(&self, text_view: Option) { - self.subject.replace(match text_view { - Some(subject) => Some(Subject::new(subject)), - None => None, - }); + self.subject.replace(text_view.map(Subject::new)); } } diff --git a/src/app/browser/window/tab/item/page/search/form.rs b/src/app/browser/window/tab/item/page/search/form.rs index b3cef100..8ddabd53 100644 --- a/src/app/browser/window/tab/item/page/search/form.rs +++ b/src/app/browser/window/tab/item/page/search/form.rs @@ -80,7 +80,6 @@ impl Form { } }); - // Connect events navigation.back.button.connect_clicked({ let subject = subject.clone(); let navigation = navigation.clone(); @@ -131,14 +130,6 @@ impl Form { pub fn hide(&self) { self.g_box.set_visible(false) } - - pub fn toggle(&self) { - if self.g_box.is_visible() { - self.hide() - } else { - self.show() - } - } } // Tools