Mastodon: Change buffer title properly after timelines are loaded during startup

This commit is contained in:
2023-04-05 09:39:39 -06:00
parent 972b851b93
commit 65aea3c43c
4 changed files with 14 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ class Controller(object):
pub.subscribe(self.toggle_share_settings, "toggleShare")
pub.subscribe(self.invisible_shorcuts_changed, "invisible-shorcuts-changed")
pub.subscribe(self.create_account_buffer, "core.create_account")
pub.subscribe(self.change_buffer_title, "core.change_buffer_title")
# Mastodon specific events.
pub.subscribe(self.mastodon_new_item, "mastodon.new_item")
@@ -1075,6 +1076,11 @@ class Controller(object):
if home != None:
wx.CallAfter(home.post_from_error, visibility=visibility, reply_to=reply_to, data=posts)
def change_buffer_title(self, name, buffer, title):
buffer_index = self.view.search(buffer, name)
if buffer_index != None and buffer_index > -1:
self.view.set_page_title(buffer_index, title)
def report_error(self, *args, **kwargs):
"""Redirects the user to the issue page on github"""
log.debug("Redirecting the user to report an error...")