summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter/services/mailbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/adapter/services/mailbox.py')
-rw-r--r--service/pixelated/adapter/services/mailbox.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/service/pixelated/adapter/services/mailbox.py b/service/pixelated/adapter/services/mailbox.py
index f934abcc..a4029d78 100644
--- a/service/pixelated/adapter/services/mailbox.py
+++ b/service/pixelated/adapter/services/mailbox.py
@@ -15,7 +15,7 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-class Mailbox:
+class Mailbox(object):
def __init__(self, mailbox_name, querier, search_engine):
self.mailbox_name = mailbox_name
@@ -23,6 +23,10 @@ class Mailbox:
self.search_engine = search_engine
self.querier = querier
+ @property
+ def fresh(self):
+ return self.querier.get_lastuid(self.mailbox_name) == 0
+
def mail(self, mail_id):
return self.querier.mail(mail_id)