[epiphany] session: code style improvement



commit 66c3f3f8651e9ce495fdf35013c31e3989140d7d
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jan 11 15:01:04 2020 -0600

    session: code style improvement
    
    The current flow here is a bit awkward.

 src/ephy-session.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index d4fc4d2e1..d36685f83 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1695,14 +1695,15 @@ ephy_session_resume (EphySession         *session,
 
   shell = ephy_shell_get_default ();
 
+  /* If we are auto-resuming, and we never want to
+   * restore the session, clobber the session state
+   * file.
+   */
+  if (policy == EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER)
+    session_delete (session);
+
   if (has_session_state == FALSE ||
       policy == EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER) {
-    /* If we are auto-resuming, and we never want to
-     * restore the session, clobber the session state
-     * file. */
-    if (policy == EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER)
-      session_delete (session);
-
     session_maybe_open_window (session, user_time);
   } else if (ephy_shell_get_n_windows (shell) == 0) {
     ephy_session_load (session, SESSION_STATE, user_time, cancellable,


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