diff options
author | Andrew Dolgov <[email protected]> | 2015-07-17 10:31:41 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-07-17 10:31:41 +0300 |
commit | 1264f3043c7cb869c13a2b2534bba639d57e0aea (patch) | |
tree | 1b028349c867b29224b33e798ac0c9402bfc82e6 | |
parent | a0ba123b43f2da888fcf3d7203d677a8c2c20a72 (diff) |
pass article to detailactivity via application to prevent transaction_too_large
3 files changed, 7 insertions, 3 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java index 1878b3c1..6d9710e2 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java @@ -5,6 +5,7 @@ import android.os.Bundle; import org.acra.ACRA; import org.acra.ReportingInteractionMode; import org.acra.annotation.ReportsCrashes; +import org.fox.ttrss.types.Article; import org.fox.ttrss.types.ArticleList; @ReportsCrashes(formKey = "", mode = ReportingInteractionMode.DIALOG, @@ -15,13 +16,14 @@ public class Application extends android.app.Application { private static Application m_singleton; public ArticleList tmpArticleList; + public Article tmpArticle; + //public Feed m_activeFeed; //public Article m_activeArticle; public int m_selectedArticleId; public String m_sessionId; public int m_apiLevel; public boolean m_canUseProgress; - public static Application getInstance(){ return m_singleton; } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java index 1a228c48..0a0cb8cb 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java @@ -79,7 +79,8 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList final Feed feed = tmpFeed; - final Article article = i.getParcelableExtra("article"); + //final Article article = i.getParcelableExtra("article"); + final Article article = Application.getInstance().tmpArticle; final String searchQuery = i.getStringExtra("searchQuery"); ArticleList tmp = Application.getInstance().tmpArticleList; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java index 38064fbd..87fc9d55 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java @@ -438,10 +438,11 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList Intent intent = new Intent(MasterActivity.this, DetailActivity.class); intent.putExtra("feed", hf.getFeed()); - intent.putExtra("article", article); + //intent.putExtra("article", article); intent.putExtra("searchQuery", hf.getSearchQuery()); //intent.putExtra("articles", (Parcelable)hf.getAllArticles()); Application.getInstance().tmpArticleList = hf.getAllArticles(); + Application.getInstance().tmpArticle = article; /* if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { startActivityForResult(intent, HEADLINES_REQUEST, ActivityOptions.makeSceneTransitionAnimation(this).toBundle()); |