Wednesday, 12 August 2015

Keeping roster items expanded

After implementing roster proxy model to serve multiple RosterModels I had to update RosterGroupExpandinessPersister class (that keeps given items expanded, also after Swift restart) to manage AccountRosterItems too.

Collapsed groups were stored in string list as a setting. I have implemented CollapsedRosterItemsSet where information about each account and its groups state is stored. We can get info whether item is expanded/collapsed with convenience methods. RosterGroupExpandinessPersister now uses this new set instead of string list. CollapsedRosterItemsSet is serializable so it's easy to load/save it.

No comments:

Post a Comment