in flat feedlist mode, put all special feeds in a single category

This commit is contained in:
Andrew Dolgov 2014-11-12 09:45:57 +03:00
parent 487d05e6c0
commit 7e2a789a35

View File

@ -543,12 +543,23 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
for (Feed f : feeds) for (Feed f : feeds)
if (f.id > -10 || m_catId != -4) { // skip labels for flat feedlist for now if (f.id > -10 || m_catId != -4) { // skip labels for flat feedlist for now
if (m_activeCategory != null || f.id >= 0) {
m_feeds.add(f); m_feeds.add(f);
catUnread += f.unread; catUnread += f.unread;
}
} }
sortFeeds(); sortFeeds();
if (m_activeCategory == null) {
Feed feed = new Feed(-1, "Special", true);
feed.unread = catUnread;
m_feeds.add(0, feed);
m_adapter.notifyDataSetChanged();
}
if (m_enableParentBtn && m_activeCategory != null && m_activeCategory.id >= 0 && m_feeds.size() > 0) { if (m_enableParentBtn && m_activeCategory != null && m_activeCategory.id >= 0 && m_feeds.size() > 0) {
Feed feed = new Feed(m_activeCategory.id, m_activeCategory.title, true); Feed feed = new Feed(m_activeCategory.id, m_activeCategory.title, true);
feed.unread = catUnread; feed.unread = catUnread;