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

View File

@ -412,7 +412,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
if (list != null) { if (list != null) {
FeedCategory cat = (FeedCategory)list.getItemAtPosition(position); 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_prefs.getBoolean("browse_cats_like_feeds", false)) {
m_activity.openFeedArticles(new Feed(cat.id, cat.title, true)); 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("feed", feed);
intent.putExtra("article", new Article()); intent.putExtra("article", new Article());
startActivityForResult(intent, 0); 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

@ -256,7 +256,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
if (list != null) { if (list != null) {
Feed feed = (Feed)list.getItemAtPosition(position); Feed feed = (Feed)list.getItemAtPosition(position);
if (feed.is_cat) { if (feed.is_cat) {
if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) && if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) &&
m_prefs.getBoolean("browse_cats_like_feeds", false)) { m_prefs.getBoolean("browse_cats_like_feeds", false)) {

View File

@ -73,7 +73,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
HeadlinesFragment hf = new HeadlinesFragment(feed, article); HeadlinesFragment hf = new HeadlinesFragment(feed, article);
hf.setSearchQuery(searchQuery); 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); af.setSearchQuery(searchQuery);
ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES); ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES);

View File

@ -84,7 +84,10 @@ 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 = getArticleById(activeArticle.id);
if (activeArticle != null) {
m_activeArticle = getArticleById(activeArticle.id);
}
} }
public HeadlinesFragment() { public HeadlinesFragment() {