mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-07-06 23:41:17 +02:00
Fix broken application.app.controller references in Bluesky buffers
application.app was never set anywhere - application.py is just a constants module. Every call to view_chat(), on_new_chat(), view_conversation(), on_reposts(), and on_likes() crashed with AttributeError, silently swallowed by get_event's except clause. Fix: store controller reference on each buffer during create_buffer() in mainController, then use self.controller instead of the broken application.app.controller pattern throughout all Bluesky buffer and dialog code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -167,8 +167,7 @@ class ConversationListBuffer(BaseBuffer):
|
||||
user_handle = getattr(profile, "handle", None) or (profile.get("handle") if isinstance(profile, dict) else None) or handle
|
||||
title = _("Chat: {0}").format(user_handle)
|
||||
# Create the buffer under direct_messages node
|
||||
import application
|
||||
wx.CallAfter(self._create_chat_buffer, application.app.controller, title, convo_id)
|
||||
wx.CallAfter(self._create_chat_buffer, self.controller, title, convo_id)
|
||||
# Refresh conversation list
|
||||
wx.CallAfter(self.start_stream, True, False)
|
||||
except Exception:
|
||||
@@ -340,8 +339,7 @@ class ConversationListBuffer(BaseBuffer):
|
||||
|
||||
title = _("Chat: {0}").format(names)
|
||||
|
||||
import application
|
||||
self._create_chat_buffer(application.app.controller, title, convo_id)
|
||||
self._create_chat_buffer(self.controller, title, convo_id)
|
||||
|
||||
def _create_chat_buffer(self, controller, title, convo_id):
|
||||
"""Create a chat buffer under the direct_messages node, avoiding duplicates."""
|
||||
|
||||
Reference in New Issue
Block a user