diff options
Diffstat (limited to 'org.fox.ttrss/src')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | org.fox.ttrss/src/main/java/org/fox/ttrss/GlobalState.java | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java | 22 | ||||
-rwxr-xr-x[-rw-r--r--] | org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java | 6 |
4 files changed, 24 insertions, 19 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java index bf6f05c9..50a74bc5 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java @@ -141,9 +141,9 @@ public class ArticlePager extends Fragment { @SuppressWarnings({ "serial" }) protected void refresh(boolean append) { - if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) { + /* if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) { append = false; - } + } */ HeadlinesRequest req = new HeadlinesRequest(getActivity().getApplicationContext(), m_activity, m_feed, m_articles) { @Override @@ -277,10 +277,10 @@ public class ArticlePager extends Fragment { public void onResume() { super.onResume(); - if (m_articles.size() == 0 || !m_feed.equals(GlobalState.getInstance().m_activeFeed)) { + /* if (m_articles.size() == 0 || !m_feed.equals(GlobalState.getInstance().m_activeFeed)) { refresh(false); GlobalState.getInstance().m_activeFeed = m_feed; - } + } */ m_activity.invalidateOptionsMenu(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/GlobalState.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/GlobalState.java index f850460e..bce416be 100644..100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/GlobalState.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/GlobalState.java @@ -6,7 +6,6 @@ import android.os.Bundle; import org.acra.ACRA; import org.acra.ReportingInteractionMode; import org.acra.annotation.ReportsCrashes; -import org.fox.ttrss.types.Feed; @ReportsCrashes(formKey = "", mode = ReportingInteractionMode.DIALOG, excludeMatchingSharedPreferencesKeys = {"password"}, resDialogText = R.string.crash_dialog_text, @@ -15,7 +14,7 @@ public class GlobalState extends Application { private static GlobalState m_singleton; //public ArticleList m_loadedArticles = new ArticleList(); - public Feed m_activeFeed; + //public Feed m_activeFeed; //public Article m_activeArticle; public int m_selectedArticleId; public String m_sessionId; @@ -38,7 +37,7 @@ public class GlobalState extends Application { out.setClassLoader(getClass().getClassLoader()); //out.putParcelableArrayList("gs:loadedArticles", m_loadedArticles); - out.putParcelable("gs:activeFeed", m_activeFeed); + //out.putParcelable("gs:activeFeed", m_activeFeed); //out.putParcelable("gs:activeArticle", m_activeArticle); out.putString("gs:sessionId", m_sessionId); out.putInt("gs:apiLevel", m_apiLevel); @@ -54,7 +53,7 @@ public class GlobalState extends Application { m_loadedArticles.add((Article)p); } */ - m_activeFeed = (Feed) in.getParcelable("gs:activeFeed"); + //m_activeFeed = (Feed) in.getParcelable("gs:activeFeed"); //m_activeArticle = (Article) in.getParcelable("gs:activeArticle"); m_sessionId = in.getString("gs:sessionId"); m_apiLevel = in.getInt("gs:apiLevel"); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 66c728f8..21377654 100644..100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -369,8 +369,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, } Log.d(TAG, "onCreateView, feed=" + m_feed); - - return view; + + return view; } @Override @@ -385,15 +385,23 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, if (m_activeArticle != null) { setActiveArticle(m_activeArticle); } - - if (m_articles.size() == 0 || !m_feed.equals(GlobalState.getInstance().m_activeFeed)) { + + /* if (!(m_activity instanceof HeadlinesActivity)) { + refresh(false); + } */ + + if (m_articles.size() == 0) { + refresh(false); + } + + /* if (m_articles.size() == 0 || !m_feed.equals(GlobalState.getInstance().m_activeFeed)) { if (m_activity.getSupportFragmentManager().findFragmentByTag(CommonActivity.FRAG_ARTICLE) == null) { refresh(false); GlobalState.getInstance().m_activeFeed = m_feed; } } else { notifyUpdated(); - } + } */ m_activity.invalidateOptionsMenu(); } @@ -440,9 +448,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, if (m_swipeLayout != null) m_swipeLayout.setRefreshing(true); - if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) { + /* if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) { append = false; - } + } */ // new stuff may appear on top, scroll back to show it if (!append) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java index 4672df54..21b9c2b7 100644..100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java @@ -1,7 +1,6 @@ package org.fox.ttrss.util; import android.content.Context; -import android.util.Log; import com.google.gson.Gson; import com.google.gson.JsonArray; @@ -9,7 +8,6 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; import org.fox.ttrss.ApiRequest; -import org.fox.ttrss.GlobalState; import org.fox.ttrss.OnlineActivity; import org.fox.ttrss.types.Article; import org.fox.ttrss.types.ArticleList; @@ -42,10 +40,10 @@ public class HeadlinesRequest extends ApiRequest { try { // check if we are returning results for correct feed - if (GlobalState.getInstance().m_activeFeed != null && !m_feed.equals(GlobalState.getInstance().m_activeFeed)) { + /* if (GlobalState.getInstance().m_activeFeed != null && !m_feed.equals(GlobalState.getInstance().m_activeFeed)) { Log.d(TAG, "received results for wrong feed, bailing out."); return; - } + } */ JsonArray content = result.getAsJsonArray(); if (content != null) { |