[geary/wip/unread-status-714865: 7/10] Check for is_no_select
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/unread-status-714865: 7/10] Check for is_no_select
- Date: Fri, 21 Feb 2014 01:29:31 +0000 (UTC)
commit d292fb47a77bfaa80d478ea7604178911275dace
Author: Charles Lindsay <chaz yorba org>
Date: Thu Feb 20 16:20:25 2014 -0800
Check for is_no_select
src/engine/imap/api/imap-account.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/imap/api/imap-account.vala b/src/engine/imap/api/imap-account.vala
index 976a9ba..d8940c1 100644
--- a/src/engine/imap/api/imap-account.vala
+++ b/src/engine/imap/api/imap-account.vala
@@ -199,7 +199,12 @@ private class Geary.Imap.Account : BaseObject {
throws Error {
check_open();
- // TODO: check mailbox_info.attrs.is_no_select first?
+ MailboxInformation? mailbox_info = path_to_mailbox.get(path);
+ if (mailbox_info == null)
+ throw_not_found(path);
+ if (mailbox_info.attrs.is_no_select)
+ throw new EngineError.UNSUPPORTED("Can't fetch unseen count for unselectable folder %s", path);
+
StatusData data = yield fetch_status_async(path, { StatusDataType.UNSEEN }, cancellable);
return data.unseen;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]