fix default_feed_view=articles on tablets, bump version

This commit is contained in:
Andrew Dolgov 2013-01-07 00:54:24 +04:00
parent c3adf2efff
commit f0bc21b1a8
6 changed files with 17 additions and 6 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="131"
android:versionName="1.9" >
android:versionCode="132"
android:versionName="1.10" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -412,7 +412,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
if (list != null) {
FeedCategory cat = (FeedCategory)list.getItemAtPosition(position);
if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) &&
if ("ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) &&
m_prefs.getBoolean("browse_cats_like_feeds", false)) {
m_activity.openFeedArticles(new Feed(cat.id, cat.title, true));

View File

@ -320,6 +320,14 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
intent.putExtra("feed", feed);
intent.putExtra("article", new Article());
startActivityForResult(intent, 0);
} else {
Intent intent = new Intent(FeedsActivity.this, HeadlinesActivity.class);
intent.putExtra("feed", feed);
intent.putExtra("article", (Article)null);
intent.putExtra("searchQuery", (String)null);
startActivityForResult(intent, 0);
overridePendingTransition(R.anim.right_slide_in, 0);
}
}

View File

@ -73,7 +73,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
HeadlinesFragment hf = new HeadlinesFragment(feed, article);
hf.setSearchQuery(searchQuery);
ArticlePager af = new ArticlePager(hf.getArticleById(article.id), feed);
ArticlePager af = new ArticlePager(article != null ? hf.getArticleById(article.id) : new Article(), feed);
af.setSearchQuery(searchQuery);
ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES);

View File

@ -84,8 +84,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
public HeadlinesFragment(Feed feed, Article activeArticle) {
m_feed = feed;
if (activeArticle != null) {
m_activeArticle = getArticleById(activeArticle.id);
}
}
public HeadlinesFragment() {
//