mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Fixed a bug in timer handling. Fixes #151
This commit is contained in:
parent
696b6aa11d
commit
5a249ba942
@ -931,8 +931,8 @@ class Controller(object):
|
||||
self.view.insert_buffer(buffer.buffer, name=_(u"Trending topics for %s") % (trends.get_string()), pos=pos)
|
||||
self.buffers.append(buffer)
|
||||
buffer.start_stream()
|
||||
timer = RepeatingTimer(300, buffer.start_stream)
|
||||
timer.start()
|
||||
buffer.timer = RepeatingTimer(300, buffer.start_stream)
|
||||
buffer.timer.start()
|
||||
buffer.session.settings["other_buffers"]["trending_topic_buffers"].append(woeid)
|
||||
buffer.session.settings.write()
|
||||
|
||||
@ -987,9 +987,10 @@ class Controller(object):
|
||||
buff = self.view.search(buffer.name, buffer.account)
|
||||
answer = buffer.remove_buffer()
|
||||
if answer == False: return
|
||||
if hasattr(buff, "timer"):
|
||||
log.debug("destroying buffer...")
|
||||
if hasattr(buffer, "timer"):
|
||||
log.debug("Stopping timer...")
|
||||
buff.timer.cancel()
|
||||
buffer.timer.cancel()
|
||||
log.debug("Timer cancelled.")
|
||||
self.right()
|
||||
self.view.delete_buffer(buff)
|
||||
|
Loading…
Reference in New Issue
Block a user