From 24fe7ccf1c87df1f20bb080e16ab928ed27f1a9c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 16 Sep 2012 23:31:38 +0400 Subject: [PATCH] fix headlinesactivity initial item not being scrolled to --- src/org/fox/ttrss/HeadlinesFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index a42127ee..24b1853f 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -96,12 +96,12 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, public HeadlinesFragment(Feed feed) { m_feed = feed; } - + public HeadlinesFragment(Feed feed, Article activeArticle) { m_feed = feed; - m_activeArticle = activeArticle; + m_activeArticle = getArticleById(activeArticle.id); } - + public HeadlinesFragment() { // } @@ -295,6 +295,10 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, public void onResume() { super.onResume(); + if (m_activeArticle != null) { + setActiveArticle(m_activeArticle); + } + /* if (TinyApplication.getInstance().m_activeArticle != null) { m_activeArticle = TinyApplication.getInstance().m_activeArticle; notifyUpdated();