[fractal/fix-split-stacks] Fix bug where session page is blank while login is skipped



commit ca2846b3a174d1d393fdbec558a1d93a9867fada
Author: Alejandro Domínguez <adomu net-c com>
Date:   Wed Jul 21 15:14:35 2021 +0200

    Fix bug where session page is blank while login is skipped

 src/window.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/window.rs b/src/window.rs
index 91c85dee..8654fe0f 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -131,13 +131,16 @@ impl Window {
         match secret::restore_sessions() {
             Ok(sessions) => {
                 let login = &imp::Window::from_instance(self).login.get();
+                let n = sessions.len();
                 for stored_session in sessions {
                     let session = Session::new();
                     login.set_handler_for_prepared_session(&session);
                     session.login_with_previous_session(stored_session);
                 }
 
-                self.switch_to_sessions_page();
+                if n > 0 {
+                    self.switch_to_sessions_page();
+                }
             }
             Err(error) => warn!("Failed to restore previous sessions: {:?}", error),
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]