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:
parent
fe3e40d236
commit
552476bf2c
@ -517,19 +517,8 @@ 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 (cat.id < 0) {
|
m_activity.onCatSelected(cat);
|
||||||
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_selectedCat = cat;
|
m_selectedCat = cat;
|
||||||
|
|
||||||
m_adapter.notifyDataSetChanged();
|
m_adapter.notifyDataSetChanged();
|
||||||
|
@ -392,20 +392,9 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
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")) &&
|
m_activity.onCatSelected(new FeedCategory(feed.id, feed.title, feed.unread));
|
||||||
m_prefs.getBoolean("browse_cats_like_feeds", false)) {
|
|
||||||
|
|
||||||
m_activity.openFeedArticles(feed);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
m_activity.onCatSelected(new FeedCategory(feed.id, feed.title, feed.unread));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ("ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES"))) {
|
m_activity.onFeedSelected(feed);
|
||||||
m_activity.openFeedArticles(feed);
|
|
||||||
} else {
|
|
||||||
m_activity.onFeedSelected(feed);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_selectedFeed = feed;
|
m_selectedFeed = feed;
|
||||||
|
@ -208,15 +208,8 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli
|
|||||||
if (cursor != null) {
|
if (cursor != null) {
|
||||||
int feedId = (int) cursor.getLong(0);
|
int feedId = (int) cursor.getLong(0);
|
||||||
Log.d(TAG, "clicked on feed " + feedId);
|
Log.d(TAG, "clicked on feed " + feedId);
|
||||||
|
|
||||||
if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) &&
|
m_activity.onCatSelected(feedId);
|
||||||
m_prefs.getBoolean("browse_cats_like_feeds", false)) {
|
|
||||||
|
|
||||||
m_activity.openFeedArticles(feedId, true);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
m_activity.onCatSelected(feedId);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_selectedCatId = feedId;
|
m_selectedCatId = feedId;
|
||||||
|
|
||||||
|
@ -226,12 +226,8 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene
|
|||||||
int feedId = (int) cursor.getLong(0);
|
int feedId = (int) cursor.getLong(0);
|
||||||
Log.d(TAG, "clicked on feed " + feedId);
|
Log.d(TAG, "clicked on feed " + feedId);
|
||||||
|
|
||||||
if (!m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES"))) {
|
m_activity.onFeedSelected(feedId);
|
||||||
m_activity.openFeedArticles(feedId, false);
|
|
||||||
} else {
|
|
||||||
m_activity.onFeedSelected(feedId);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_selectedFeedId = feedId;
|
m_selectedFeedId = feedId;
|
||||||
|
|
||||||
m_adapter.notifyDataSetChanged();
|
m_adapter.notifyDataSetChanged();
|
||||||
|
@ -13,10 +13,6 @@
|
|||||||
<item>@string/category_browse_headlines</item>
|
<item>@string/category_browse_headlines</item>
|
||||||
<item>@string/category_browse_articles</item>
|
<item>@string/category_browse_articles</item>
|
||||||
</string-array>
|
</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">
|
<string-array name="pref_offline_amounts" translatable="false">
|
||||||
<item>150</item>
|
<item>150</item>
|
||||||
<item>250</item>
|
<item>250</item>
|
||||||
|
@ -79,14 +79,6 @@
|
|||||||
android:summary="@string/browse_cats_like_feeds_summary"
|
android:summary="@string/browse_cats_like_feeds_summary"
|
||||||
android:title="@string/browse_cats_like_feeds" />
|
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
|
<CheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="headlines_show_content"
|
android:key="headlines_show_content"
|
||||||
|
Loading…
Reference in New Issue
Block a user