mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-31 05:10:45 -06:00
Enter will create a new tweet in trends buffers
This commit is contained in:
parent
5e91808b73
commit
3815ce0a67
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user