Feat: Open conversations from community timelines.

This commit is contained in:
Manuel Cortez 2024-05-21 12:50:43 -06:00
parent 49c32ad4b8
commit 68651ff736
2 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,7 @@ TWBlue Changelog
* fixed an error that caused TWBlue to not display some posts correctly. * fixed an error that caused TWBlue to not display some posts correctly.
* Fixed name for community timelines when created during startup. Now it should be clear if it's a federated or local timeline. * Fixed name for community timelines when created during startup. Now it should be clear if it's a federated or local timeline.
* Defined shortcuts to fields on the update profile dialog so it will be easier to navigate. * Defined shortcuts to fields on the update profile dialog so it will be easier to navigate.
* Now it is possible to load conversations directly from community timelines.
## Changes in version 2024.5.19 ## Changes in version 2024.5.19

View File

@ -130,6 +130,11 @@ class Handler(object):
pub.sendMessage("buffer-title-changed", buffer=buffer) pub.sendMessage("buffer-title-changed", buffer=buffer)
def open_conversation(self, controller, buffer): def open_conversation(self, controller, buffer):
# detect if we are in a community buffer.
# Community buffers are special because we'll need to retrieve the object locally at first.
if hasattr(buffer, "community_url"):
post = buffer.get_item_from_instance()
else:
post = buffer.get_item() post = buffer.get_item()
if post.reblog != None: if post.reblog != None:
post = post.reblog post = post.reblog