fix headlinesactivity initial item not being scrolled to

This commit is contained in:
Andrew Dolgov 2012-09-16 23:31:38 +04:00
parent 556196cf6a
commit 24fe7ccf1c

View File

@ -99,7 +99,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
public HeadlinesFragment(Feed feed, Article activeArticle) { public HeadlinesFragment(Feed feed, Article activeArticle) {
m_feed = feed; m_feed = feed;
m_activeArticle = activeArticle; m_activeArticle = getArticleById(activeArticle.id);
} }
public HeadlinesFragment() { public HeadlinesFragment() {
@ -295,6 +295,10 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
if (m_activeArticle != null) {
setActiveArticle(m_activeArticle);
}
/* if (TinyApplication.getInstance().m_activeArticle != null) { /* if (TinyApplication.getInstance().m_activeArticle != null) {
m_activeArticle = TinyApplication.getInstance().m_activeArticle; m_activeArticle = TinyApplication.getInstance().m_activeArticle;
notifyUpdated(); notifyUpdated();