From 0a395af3a9d44be402a53f1d9ec90a7ae4bec433 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 22 Aug 2022 15:40:01 -0500 Subject: [PATCH] Updated changelog --- doc/changelog.md | 1 + src/controller/mainController.py | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/changelog.md b/doc/changelog.md index 4e69a791..1847dcd8 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -7,6 +7,7 @@ TWBlue Changelog * It is possible to use the user autocompletion functionality in dialogs where you can select an user, for example when adding or removing someone from a list, or displaying lists for someone. * Implemented a new setting, available in the account settings dialog, that allows to hide emojis in twitter usernames. * TWBlue should be able to sort conversations in a more logical way. This should make it easier to follow a long thread in Twitter. +* When opening a thread, TWBlue should be able to load the right conversation if the original tweet from where the thread was loaded was a retweet. * Fixed error when attempting to mention an user by using the "mention" button in any people buffer. Now tweets should be posted normally. * Fixed error when loading other user lists. ([#465](https://github.com/MCV-Software/TWBlue/issues/465)) * Fixed an issue that was making TWBlue to display incorrectly some retweets of quoted tweets. diff --git a/src/controller/mainController.py b/src/controller/mainController.py index c6fd6f52..f29027e9 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -941,10 +941,12 @@ class Controller(object): def open_conversation(self, *args, **kwargs): buffer = self.get_current_buffer() - id = buffer.get_right_tweet().id - user = buffer.session.get_user(buffer.get_right_tweet().user).screen_name - search = buffers.twitter.ConversationBuffer(self.view.nb, "search_tweets", "%s-searchterm" % (id,), buffer.session, buffer.session.db["user_name"], bufferType="searchPanel", sound="search_updated.ogg", since_id=id, q="@{0}".format(user,)) - search.tweet = buffer.get_right_tweet() + tweet = buffer.get_right_tweet() + if hasattr(tweet, "retweeted_status") and tweet.retweeted_status != None: + tweet = tweet.retweeted_status + user = buffer.session.get_user(tweet.user).screen_name + search = buffers.twitter.ConversationBuffer(self.view.nb, "search_tweets", "%s-searchterm" % (tweet.id,), buffer.session, buffer.session.db["user_name"], bufferType="searchPanel", sound="search_updated.ogg", since_id=tweet.id, q="@{0}".format(user,)) + search.tweet = tweet search.start_stream(start=True) pos=self.view.search("searches", buffer.session.db["user_name"]) self.insert_buffer(search, pos)