mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Restart streaming in certain changes to followed/muted people
This commit is contained in:
parent
ac80e039b2
commit
c6cbe3360b
@ -8,6 +8,7 @@ TWBlue Changelog
|
|||||||
* Implemented a new setting, available in the account settings dialog, that allows to hide emojis in twitter usernames.
|
* 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.
|
* 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.
|
* 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.
|
||||||
|
* TWBlue will restart the Streaming subsystem every time there are changes to followed, muted or blocked users within the application.
|
||||||
* 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 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 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.
|
* Fixed an issue that was making TWBlue to display incorrectly some retweets of quoted tweets.
|
||||||
|
@ -135,6 +135,7 @@ class Controller(object):
|
|||||||
pub.subscribe(self.manage_unblocked_user, "unblocked-user")
|
pub.subscribe(self.manage_unblocked_user, "unblocked-user")
|
||||||
pub.subscribe(self.create_buffer, "createBuffer")
|
pub.subscribe(self.create_buffer, "createBuffer")
|
||||||
pub.subscribe(self.toggle_share_settings, "toggleShare")
|
pub.subscribe(self.toggle_share_settings, "toggleShare")
|
||||||
|
pub.subscribe(self.restart_streaming, "restartStreaming")
|
||||||
if system == "Windows":
|
if system == "Windows":
|
||||||
pub.subscribe(self.invisible_shorcuts_changed, "invisible-shorcuts-changed")
|
pub.subscribe(self.invisible_shorcuts_changed, "invisible-shorcuts-changed")
|
||||||
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.show_hide, menuitem=self.view.show_hide)
|
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.show_hide, menuitem=self.view.show_hide)
|
||||||
@ -1656,7 +1657,6 @@ class Controller(object):
|
|||||||
def toggle_share_settings(self, shareable=True):
|
def toggle_share_settings(self, shareable=True):
|
||||||
self.view.retweet.Enable(shareable)
|
self.view.retweet.Enable(shareable)
|
||||||
|
|
||||||
|
|
||||||
def check_streams(self):
|
def check_streams(self):
|
||||||
if self.started == False:
|
if self.started == False:
|
||||||
return
|
return
|
||||||
@ -1666,3 +1666,10 @@ class Controller(object):
|
|||||||
sessions.sessions[i].check_streams()
|
sessions.sessions[i].check_streams()
|
||||||
except TweepyException: # We shouldn't allow this function to die.
|
except TweepyException: # We shouldn't allow this function to die.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def restart_streaming(self, session):
|
||||||
|
for s in sessions.sessions:
|
||||||
|
if sessions.sessions[s].session_id == session:
|
||||||
|
log.debug("Restarting stream in session %s" % (session))
|
||||||
|
sessions.sessions[s].stop_streaming()
|
||||||
|
sessions.sessions[s].start_streaming()
|
@ -29,36 +29,42 @@ class userActionsController(object):
|
|||||||
def follow(self, user):
|
def follow(self, user):
|
||||||
try:
|
try:
|
||||||
self.session.twitter.create_friendship(screen_name=user )
|
self.session.twitter.create_friendship(screen_name=user )
|
||||||
|
pub.sendMessage("restartStreaming", session=self.session.session_id)
|
||||||
except TweepyException as err:
|
except TweepyException as err:
|
||||||
output.speak("Error %s" % (str(err)), True)
|
output.speak("Error %s" % (str(err)), True)
|
||||||
|
|
||||||
def unfollow(self, user):
|
def unfollow(self, user):
|
||||||
try:
|
try:
|
||||||
id = self.session.twitter.destroy_friendship(screen_name=user )
|
id = self.session.twitter.destroy_friendship(screen_name=user )
|
||||||
|
pub.sendMessage("restartStreaming", session=self.session.session_id)
|
||||||
except TweepyException as err:
|
except TweepyException as err:
|
||||||
output.speak("Error %s" % (str(err)), True)
|
output.speak("Error %s" % (str(err)), True)
|
||||||
|
|
||||||
def mute(self, user):
|
def mute(self, user):
|
||||||
try:
|
try:
|
||||||
id = self.session.twitter.create_mute(screen_name=user )
|
id = self.session.twitter.create_mute(screen_name=user )
|
||||||
|
pub.sendMessage("restartStreaming", session=self.session.session_id)
|
||||||
except TweepyException as err:
|
except TweepyException as err:
|
||||||
output.speak("Error %s" % (str(err)), True)
|
output.speak("Error %s" % (str(err)), True)
|
||||||
|
|
||||||
def unmute(self, user):
|
def unmute(self, user):
|
||||||
try:
|
try:
|
||||||
id = self.session.twitter.destroy_mute(screen_name=user )
|
id = self.session.twitter.destroy_mute(screen_name=user )
|
||||||
|
pub.sendMessage("restartStreaming", session=self.session.session_id)
|
||||||
except TweepyException as err:
|
except TweepyException as err:
|
||||||
output.speak("Error %s" % (str(err)), True)
|
output.speak("Error %s" % (str(err)), True)
|
||||||
|
|
||||||
def report(self, user):
|
def report(self, user):
|
||||||
try:
|
try:
|
||||||
id = self.session.twitter.report_spam(screen_name=user )
|
id = self.session.twitter.report_spam(screen_name=user )
|
||||||
|
pub.sendMessage("restartStreaming", session=self.session.session_id)
|
||||||
except TweepyException as err:
|
except TweepyException as err:
|
||||||
output.speak("Error %s" % (str(err)), True)
|
output.speak("Error %s" % (str(err)), True)
|
||||||
|
|
||||||
def block(self, user):
|
def block(self, user):
|
||||||
try:
|
try:
|
||||||
id = self.session.twitter.create_block(screen_name=user )
|
id = self.session.twitter.create_block(screen_name=user )
|
||||||
|
pub.sendMessage("restartStreaming", session=self.session.session_id)
|
||||||
except TweepyException as err:
|
except TweepyException as err:
|
||||||
output.speak("Error %s" % (str(err)), True)
|
output.speak("Error %s" % (str(err)), True)
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user