You can use two bools as an alternate, but I'm not sure what the
complication is.  There is no bool -> enum mapping required, basically you
have

```
typedef enum { STATE_OK, STATE_UPDATE_PENDING, STATE_UPDATE_DONE } STATE;
STATE m_state;

if (m_state == STATE_UPDATE_DONE)
{
  m_state = STATE_OK;
  changed = true; // tell container to update
}

if (m_state == STATE_UPDATE_PENDING || UrlIsUpdated())
{
  FireJob();
  m_state = STATE_OK;
}
```
etc.


On Sun, Feb 23, 2014 at 11:24 AM, Black09 <notifications@github.com> wrote:

> In xbmc/listproviders/DirectoryProvider.cpp:
>
> >
> >    for (vector<CGUIStaticItemPtr>::iterator i = m_items.begin(); i != m_items.end(); ++i)
> >      changed |= (*i)->UpdateVisibility(m_parentID);
> >    return changed; // TODO: Also returned changed if properties are changed (if so, need to update scroll to letter).
> >  }
> >
> > +void CDirectoryProvider::Announce(AnnouncementFlag flag, const char *sender, const char *message, const CVariant &data)
> > +{
> > +  CLog::Log(LOGDEBUG, "GOT ANNOUNCEMENT, type: %i, from %s, message %s", (int)flag, sender, message);
> > +
> > +  // Fire off a new job if needed
> > +  if (NeedsRefresh(flag, message))
> > +    FireJob();
>
> So I did try to change m_invalid to an enum but do you really think it's
> worth the effort? It makes everything more complicated imo because of the
> bool <> enum mapping.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/xbmc/xbmc/pull/4243/files#r9973340>
> .
>