From 3815ce0a672f153494ba6f7fde4c6cca550864d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sat, 23 Jul 2016 16:40:40 -0500 Subject: [PATCH] Enter will create a new tweet in trends buffers --- src/controller/buffersController.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/controller/buffersController.py b/src/controller/buffersController.py index b02ac5a4..a0dd3b64 100644 --- a/src/controller/buffersController.py +++ b/src/controller/buffersController.py @@ -984,10 +984,10 @@ class trendsBufferController(bufferController): self.get_formatted_message = self.get_message self.reply = self.search_topic - def start_stream(self): + def start_stream(self, mandatory=False): # starts stream every 3 minutes. current_time = time.time() - if self.execution_time == 0 or current_time-self.execution_time >= 180: + if self.execution_time == 0 or current_time-self.execution_time >= 180 or mandatory == True: self.execution_time = current_time try: data = self.session.call_paged("get_place_trends", id=self.trendsFor) @@ -1033,6 +1033,9 @@ class trendsBufferController(bufferController): elif dlg == widgetUtils.NO: return False + def url(self, *args, **kwargs): + self.tweet_about_this_trend() + def search_topic(self, *args, **kwargs): topic = self.trends[self.buffer.list.get_selected()]["name"] pub.sendMessage("search", term=topic)