Fixed thunderbird
(deeeeeep recursion)
This commit is contained in:
parent
9e6af3661a
commit
8fba0b69a3
@ -27,7 +27,7 @@ class Thunderbird(Backend):
|
|||||||
* python-gobject2
|
* python-gobject2
|
||||||
"""
|
"""
|
||||||
|
|
||||||
unread = set()
|
_unread = set()
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
|
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
|
||||||
@ -45,14 +45,14 @@ class Thunderbird(Backend):
|
|||||||
self.run = partial(self.context.iteration, False)
|
self.run = partial(self.context.iteration, False)
|
||||||
|
|
||||||
def new_msg(self, id, author, subject):
|
def new_msg(self, id, author, subject):
|
||||||
if id not in self.unread:
|
if id not in self._unread:
|
||||||
self.unread.add(id)
|
self._unread.add(id)
|
||||||
|
|
||||||
def changed_msg(self, id, event):
|
def changed_msg(self, id, event):
|
||||||
if event == "read" and id in self.unread:
|
if event == "read" and id in self._unread:
|
||||||
self.unread.remove(id)
|
self._unread.remove(id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unread(self):
|
def unread(self):
|
||||||
self.run()
|
self.run()
|
||||||
return len(self.unread)
|
return len(self._unread)
|
||||||
|
Loading…
Reference in New Issue
Block a user