Skip to content

Commit

Permalink
Add unsubscribed_loaded property to IMP_Ftree
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 21, 2014
1 parent 8e35cff commit f61ade2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion imp/lib/Ftree.php
Expand Up @@ -30,6 +30,8 @@
* @property-read IMP_FTree_Prefs_Expanded $expanded The expanded folders
* list.
* @property-read IMP_Ftree_Prefs_Poll $poll The poll list.
* @property-read boolean $unsubscribed_loaded True if unsubscribed mailboxes
* have been loaded.
*/
class IMP_Ftree implements ArrayAccess, Countable, IteratorAggregate, Serializable
{
Expand Down Expand Up @@ -128,6 +130,9 @@ public function __get($name)
$this->_temp['poll'] = new IMP_Ftree_Prefs_Poll($this);
}
return $this->_temp['poll'];

case 'unusubscribed_loaded':
return $this[self::BASE_ELT]->subscribed;
}
}

Expand Down Expand Up @@ -433,7 +438,7 @@ public function loadUnsubscribed()
{
/* If we are switching from unsubscribed to subscribed, no need
* to do anything (we just ignore unsubscribed stuff). */
if ($this[self::BASE_ELT]->subscribed) {
if ($this->unsubscribed_loaded) {
return;
}

Expand Down

0 comments on commit f61ade2

Please sign in to comment.