Core: Skip sessions not yet started when switching accounts in invisible interface

This commit is contained in:
Manuel Cortez 2022-12-19 08:45:05 -06:00
parent 3680349b59
commit d4ebfac317
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790
4 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ TWBlue Changelog
## changes in this version ## 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: * Mastodon:
* Fixed an issue that was preventing TWBlue to create more than one user timeline during startup. * Fixed an issue that was preventing TWBlue to create more than one user timeline during startup.

View File

@ -300,7 +300,6 @@ class Controller(object):
session.start_streaming() session.start_streaming()
def create_account_buffer(self, name, session_id, logged=False): 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) account = buffers.base.AccountBuffer(self.view.nb, name, name, session_id)
if logged == False: if logged == False:
account.logged = logged account.logged = logged

View File

@ -20,6 +20,7 @@ class Handler(object):
def create_buffers(self, session, createAccounts=True, controller=None): def create_buffers(self, session, createAccounts=True, controller=None):
session.get_user_info() session.get_user_info()
name = session.get_name() name = session.get_name()
controller.accounts.append(name)
if createAccounts == True: if createAccounts == True:
pub.sendMessage("core.create_account", name=name, session_id=session.session_id, logged=True) pub.sendMessage("core.create_account", name=name, session_id=session.session_id, logged=True)
root_position =controller.view.search(name, name) root_position =controller.view.search(name, name)

View File

@ -20,6 +20,7 @@ class Handler(object):
def create_buffers(self, session, createAccounts=True, controller=None): def create_buffers(self, session, createAccounts=True, controller=None):
session.get_user_info() session.get_user_info()
name = session.get_name() name = session.get_name()
controller.accounts.append(name)
if createAccounts == True: if createAccounts == True:
pub.sendMessage("core.create_account", name=name, session_id=session.session_id, logged=True) pub.sendMessage("core.create_account", name=name, session_id=session.session_id, logged=True)
root_position =controller.view.search(name, name) root_position =controller.view.search(name, name)