mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-02-07 07:31:03 -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.get_formatted_message = self.get_message
|
||||||
self.reply = self.search_topic
|
self.reply = self.search_topic
|
||||||
|
|
||||||
def start_stream(self):
|
def start_stream(self, mandatory=False):
|
||||||
# starts stream every 3 minutes.
|
# starts stream every 3 minutes.
|
||||||
current_time = time.time()
|
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
|
self.execution_time = current_time
|
||||||
try:
|
try:
|
||||||
data = self.session.call_paged("get_place_trends", id=self.trendsFor)
|
data = self.session.call_paged("get_place_trends", id=self.trendsFor)
|
||||||
@ -1033,6 +1033,9 @@ class trendsBufferController(bufferController):
|
|||||||
elif dlg == widgetUtils.NO:
|
elif dlg == widgetUtils.NO:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def url(self, *args, **kwargs):
|
||||||
|
self.tweet_about_this_trend()
|
||||||
|
|
||||||
def search_topic(self, *args, **kwargs):
|
def search_topic(self, *args, **kwargs):
|
||||||
topic = self.trends[self.buffer.list.get_selected()]["name"]
|
topic = self.trends[self.buffer.list.get_selected()]["name"]
|
||||||
pub.sendMessage("search", term=topic)
|
pub.sendMessage("search", term=topic)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user