diff --git a/television/draw.rs b/television/draw.rs index 5cc9db9..965cf98 100644 --- a/television/draw.rs +++ b/television/draw.rs @@ -179,12 +179,14 @@ impl Ord for Ctx { /// This layout can then be sent back to the main thread to serve for tasks where having that /// information can be useful or lead to optimizations. pub fn draw(ctx: &Ctx, f: &mut Frame<'_>, area: Rect) -> Result { - let show_preview = - ctx.config.ui.show_preview_panel && ctx.tv_state.preview_state.enabled; let show_remote = !matches!(ctx.tv_state.mode, Mode::Channel); - let layout = - Layout::build(area, &ctx.config.ui, show_remote, show_preview); + let layout = Layout::build( + area, + &ctx.config.ui, + show_remote, + ctx.tv_state.preview_state.enabled, + ); // help bar (metadata, keymaps, logo) draw_help_bar( diff --git a/television/screen/layout.rs b/television/screen/layout.rs index 10e7611..9a107e6 100644 --- a/television/screen/layout.rs +++ b/television/screen/layout.rs @@ -140,7 +140,6 @@ impl Layout { ui_config: &UiConfig, show_remote: bool, show_preview: bool, - // ) -> Self { let show_preview = show_preview && ui_config.show_preview_panel; let dimensions = Dimensions::from(ui_config.ui_scale);