From 7e2a789a35e9902cb60dd53ea802f61767329eff Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 12 Nov 2014 09:45:57 +0300 Subject: [PATCH] in flat feedlist mode, put all special feeds in a single category --- .../main/java/org/fox/ttrss/FeedsFragment.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index 31dc0ae4..a1367b8d 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -543,12 +543,23 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh for (Feed f : feeds) if (f.id > -10 || m_catId != -4) { // skip labels for flat feedlist for now - m_feeds.add(f); - catUnread += f.unread; + if (m_activeCategory != null || f.id >= 0) { + m_feeds.add(f); + catUnread += f.unread; + } } 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) { Feed feed = new Feed(m_activeCategory.id, m_activeCategory.title, true); feed.unread = catUnread;