From 6cdd3bc90d090665a759c3e92c76794e72746948 Mon Sep 17 00:00:00 2001 From: Dave Patrick Caberto Date: Sat, 23 Dec 2023 19:11:21 +0800 Subject: [PATCH] simplify --- src/session.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/session.rs b/src/session.rs index bf3cc07..f77d495 100644 --- a/src/session.rs +++ b/src/session.rs @@ -255,10 +255,6 @@ impl Session { let pages = window.pages(); - if pages.is_empty() || pages.iter().all(|page| page.document().is_discardable()) { - continue; - } - let mut pages_state = Vec::new(); for page in pages { let document = page.document(); @@ -286,6 +282,10 @@ impl Session { }); } + if pages_state.is_empty() { + continue; + } + windows_state.push(WindowState { width: window.default_width(), height: window.default_height(),