diff --git a/src/content/mod.rs b/src/content/mod.rs index 3950e65..3360433 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -133,7 +133,10 @@ pub fn content( browse_kernels_button.connect_clicked( clone!(@weak window, @weak content_stack, @strong selected_kernel_branch => move |_| { - kernel_pkg::kernel_pkg_page(&content_stack, &window, &selected_kernel_branch); + match content_stack.child_by_name("kernel_pkg_page") { + Some(_) => , + None() => kernel_pkg::kernel_pkg_page(&content_stack, &window, &selected_kernel_branch) + }; content_stack.set_visible_child_name("kernel_pkg_page") }), ); diff --git a/src/kernel_pkg/mod.rs b/src/kernel_pkg/mod.rs index 33dfc5e..20be1ef 100644 --- a/src/kernel_pkg/mod.rs +++ b/src/kernel_pkg/mod.rs @@ -137,7 +137,6 @@ pub fn kernel_pkg_page( back_button.connect_clicked(clone!(@weak content_stack, @weak main_box => move |_| { content_stack.set_visible_child_name("content_page"); - content_stack.remove(&main_box); })); window_bottombar.append(&back_button);