From af2206ffede44b1f2683b1e9cbe0d42873f8c552 Mon Sep 17 00:00:00 2001 From: aidanaden Date: Sun, 23 Jun 2024 18:31:12 +0800 Subject: [PATCH] feat: hide search tab headers --- rm-main/src/ui/tabs/search.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rm-main/src/ui/tabs/search.rs b/rm-main/src/ui/tabs/search.rs index 927207a..c162809 100644 --- a/rm-main/src/ui/tabs/search.rs +++ b/rm-main/src/ui/tabs/search.rs @@ -265,9 +265,15 @@ impl Component for SearchTab { .config .general .accent_color); - let table = Table::new(items, widths) - .header(header) - .highlight_style(table_higlight_style); + + let table = { + let table = Table::new(items, widths).highlight_style(table_higlight_style); + if !self.ctx.config.general.hide_headers { + table.header(header) + } else { + table + } + }; f.render_stateful_widget(table, rest, &mut *table_lock.state.borrow_mut());