From d4ebfac3170e78a9e864729382728b5b2cbdd61c Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 19 Dec 2022 08:45:05 -0600 Subject: [PATCH] Core: Skip sessions not yet started when switching accounts in invisible interface --- doc/changelog.md | 1 + src/controller/mainController.py | 1 - src/controller/mastodon/handler.py | 1 + src/controller/twitter/handler.py | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/changelog.md b/doc/changelog.md index 2f471a9e..7757102e 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -2,6 +2,7 @@ TWBlue Changelog ## changes in this version +* In the invisible interface, TWBlue will skip sessions that have not been started when using the keyboard shortcut to switch between different accounts. * Mastodon: * Fixed an issue that was preventing TWBlue to create more than one user timeline during startup. diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 843c9b4d..221bd174 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -300,7 +300,6 @@ class Controller(object): session.start_streaming() def create_account_buffer(self, name, session_id, logged=False): - self.accounts.append(name) account = buffers.base.AccountBuffer(self.view.nb, name, name, session_id) if logged == False: account.logged = logged diff --git a/src/controller/mastodon/handler.py b/src/controller/mastodon/handler.py index 18ec7309..6d21e9d9 100644 --- a/src/controller/mastodon/handler.py +++ b/src/controller/mastodon/handler.py @@ -20,6 +20,7 @@ class Handler(object): def create_buffers(self, session, createAccounts=True, controller=None): session.get_user_info() name = session.get_name() + controller.accounts.append(name) if createAccounts == True: pub.sendMessage("core.create_account", name=name, session_id=session.session_id, logged=True) root_position =controller.view.search(name, name) diff --git a/src/controller/twitter/handler.py b/src/controller/twitter/handler.py index 54c397f0..62011a29 100644 --- a/src/controller/twitter/handler.py +++ b/src/controller/twitter/handler.py @@ -20,6 +20,7 @@ class Handler(object): def create_buffers(self, session, createAccounts=True, controller=None): session.get_user_info() name = session.get_name() + controller.accounts.append(name) if createAccounts == True: pub.sendMessage("core.create_account", name=name, session_id=session.session_id, logged=True) root_position =controller.view.search(name, name)