Getting real unarchive support
authorepage <eopage@byu.net>
Fri, 23 Oct 2009 03:24:59 +0000 (03:24 +0000)
committerepage <eopage@byu.net>
Fri, 23 Oct 2009 03:24:59 +0000 (03:24 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@557 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/gv_backend.py
src/gv_views.py

index 0b3a0bd..32e897d 100644 (file)
@@ -591,6 +591,7 @@ class GVDialer(object):
                        message["isRead"] = jsonItem["isRead"]
                        message["isSpam"] = jsonItem["isSpam"]
                        message["isTrash"] = jsonItem["isTrash"]
+                       message["isArchived"] = "inbox" not in jsonItem["labels"]
                        yield message
 
 
index 8792e3d..a7e6cbf 100644 (file)
@@ -1293,7 +1293,7 @@ class MessagesView(object):
                if status == cls.ALL_STATUS:
                        isStatus = True
                else:
-                       isUnarchived = not message["isTrash"]
+                       isUnarchived = not message["isArchived"]
                        isUnread = not message["isRead"]
                        if status == cls.UNREAD_STATUS:
                                isStatus = isUnarchived and isUnread