remove default_view_mode partially because jumping directly to article makes options only available while viewing headlines impossible to reach

This commit is contained in:
Andrew Dolgov 2014-11-06 19:13:59 +03:00
parent fe3e40d236
commit 552476bf2c
6 changed files with 8 additions and 53 deletions

View File

@ -517,18 +517,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
if (list != null) {
FeedCategory cat = (FeedCategory)list.getItemAtPosition(position);
if (cat.id < 0) {
m_activity.onCatSelected(cat, false);
} else {
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));
} else {
m_activity.onCatSelected(cat);
}
}
m_activity.onCatSelected(cat);
m_selectedCat = cat;

View File

@ -392,20 +392,9 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
Feed feed = (Feed)list.getItemAtPosition(position);
if (feed.is_cat) {
if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) &&
m_prefs.getBoolean("browse_cats_like_feeds", false)) {
m_activity.openFeedArticles(feed);
} else {
m_activity.onCatSelected(new FeedCategory(feed.id, feed.title, feed.unread));
}
m_activity.onCatSelected(new FeedCategory(feed.id, feed.title, feed.unread));
} else {
if ("ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES"))) {
m_activity.openFeedArticles(feed);
} else {
m_activity.onFeedSelected(feed);
}
m_activity.onFeedSelected(feed);
}
m_selectedFeed = feed;

View File

@ -209,14 +209,7 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli
int feedId = (int) cursor.getLong(0);
Log.d(TAG, "clicked on feed " + feedId);
if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) &&
m_prefs.getBoolean("browse_cats_like_feeds", false)) {
m_activity.openFeedArticles(feedId, true);
} else {
m_activity.onCatSelected(feedId);
}
m_activity.onCatSelected(feedId);
m_selectedCatId = feedId;

View File

@ -226,11 +226,7 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene
int feedId = (int) cursor.getLong(0);
Log.d(TAG, "clicked on feed " + feedId);
if (!m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES"))) {
m_activity.openFeedArticles(feedId, false);
} else {
m_activity.onFeedSelected(feedId);
}
m_activity.onFeedSelected(feedId);
m_selectedFeedId = feedId;

View File

@ -13,10 +13,6 @@
<item>@string/category_browse_headlines</item>
<item>@string/category_browse_articles</item>
</string-array>
<string-array name="pref_view_mode_values" translatable="false">
<item>HEADLINES</item>
<item>ARTICLES</item>
</string-array>
<string-array name="pref_offline_amounts" translatable="false">
<item>150</item>
<item>250</item>

View File

@ -79,14 +79,6 @@
android:summary="@string/browse_cats_like_feeds_summary"
android:title="@string/browse_cats_like_feeds" />
<ListPreference
android:defaultValue="HEADLINES"
android:entries="@array/pref_view_mode_names"
android:entryValues="@array/pref_view_mode_values"
android:key="default_view_mode"
android:summary="@string/pref_default_view_mode_long"
android:title="@string/pref_default_view_mode" />
<CheckBoxPreference
android:defaultValue="true"
android:key="headlines_show_content"