diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java')
4 files changed, 44 insertions, 15 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 11930716..499cd511 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java @@ -7,18 +7,11 @@ import android.support.annotation.Nullable; import com.livefront.bridge.Bridge; import com.livefront.bridge.SavedStateHandler; -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; import icepick.Icepick; -@ReportsCrashes(mode = ReportingInteractionMode.SILENT, - excludeMatchingSharedPreferencesKeys = {"password"}, - resDialogText = R.string.crash_dialog_text, - formUri = "https://tt-rss.org/acra/submit/") public class Application extends android.app.Application { private static Application m_singleton; @@ -36,10 +29,6 @@ public class Application extends android.app.Application { public final void onCreate() { super.onCreate(); - if (!BuildConfig.DEBUG) { - ACRA.init(this); - } - Bridge.initialize(getApplicationContext(), new SavedStateHandler() { @Override public void saveInstanceState(@NonNull Object target, @NonNull Bundle state) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java index d3f1f4db..7dcdc44e 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java @@ -117,7 +117,7 @@ public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnIt sortCats(); if (!specialCatFound) { - m_cats.add(0, new FeedCategory(-1, "Special", 0)); + m_cats.add(0, new FeedCategory(-1, getString(R.string.cat_special), 0)); } m_adapter.notifyDataSetChanged(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index f14978c5..0660d339 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -115,6 +115,31 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi m_feeds.add(f); catUnread += f.unread; } + + // localize special feed names + // TODO: join with shortcut title lookup by id? + if (m_activeCategory != null && m_activeCategory.id == -1) { + switch (f.id) { + case -1: + f.title = getString(R.string.feed_starred_articles); + break; + case -2: + f.title = getString(R.string.feed_published_articles); + break; + case -3: + f.title = getString(R.string.fresh_articles); + break; + case -4: + f.title = getString(R.string.feed_all_articles); + break; + case -6: + f.title = getString(R.string.feed_recently_read); + break; + case 0: + f.title = getString(R.string.feed_archived_articles); + break; + } + } } sortFeeds(); @@ -206,8 +231,8 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi @Override public int compare(Feed a, Feed b) { - Log.d(TAG, "A:" + a.title + " " + a.is_cat + " " + a.order_id); - Log.d(TAG, "B:" + b.title + " " + b.is_cat + " " + b.order_id); + //Log.d(TAG, "A:" + a.title + " " + a.is_cat + " " + a.order_id); + //Log.d(TAG, "B:" + b.title + " " + b.is_cat + " " + b.order_id); if (a.id >= 0 && b.id >= 0) if (a.is_cat && b.is_cat) 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 4c4b544c..010949d3 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java @@ -126,6 +126,21 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList int feedId = i.getIntExtra("feed_id", 0); boolean isCat = i.getBooleanExtra("feed_is_cat", false); String feedTitle = i.getStringExtra("feed_title"); + + // app shortcuts are not allowed to pass string extras + if (feedTitle == null) { + switch (feedId) { + case -1: + feedTitle = getString(R.string.feed_starred_articles); + break; + case -3: + feedTitle = getString(R.string.fresh_articles); + break; + case -4: + feedTitle = getString(R.string.feed_all_articles); + break; + } + } Feed tmpFeed = new Feed(feedId, feedTitle, isCat); @@ -159,7 +174,7 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList ft.replace(R.id.feeds_fragment, new FeedsFragment(), FRAG_FEEDS); } - if (m_prefs.getBoolean("open_fresh_on_startup", true)) { + if (!shortcutMode && m_prefs.getBoolean("open_fresh_on_startup", true)) { HeadlinesFragment hf = new HeadlinesFragment(); if (BuildConfig.DEBUG) { |