Skip to content

Commit

Permalink
add last config load flag
Browse files Browse the repository at this point in the history
  • Loading branch information
DYefremov committed Mar 29, 2024
1 parent 3ede2e2 commit 8330104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def do_activate(self):
self._main_window.set_wmclass("DemonEditor", "DemonEditor")
self._main_window.present()

self.init_profiles()
self.init_profiles(True)
gen = self.init_http_api()
GLib.idle_add(lambda: next(gen, False), priority=GLib.PRIORITY_LOW)

Expand Down Expand Up @@ -875,9 +875,9 @@ def set_accels(self):
self.set_accels_for_action("app.on_logs_show", ["<shift><primary>l"])
self.set_accels_for_action("win.filter", ["<shift><primary>f"])

def init_profiles(self):
def init_profiles(self, last_config=False):
self.update_profiles()
if self._settings.load_last_config:
if last_config and self._settings.load_last_config:
config = self._settings.get("last_config") or {}
if config.get("last_bouquet", None):
self.connect("data-load-done", self.open_last_bouquet)
Expand Down

0 comments on commit 8330104

Please sign in to comment.