From 0a0dc0d5960b26e44eb513a3f99f08a68233fb7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 29 Dec 2015 12:32:21 +0100 Subject: [PATCH] AppDetails: don't hide unknown anti-features This is thinking of the future, when new AFs are added and the installed client doens't know about them yet. Showing the name is better than not showing anything at all. --- F-Droid/src/org/fdroid/fdroid/AppDetails.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/F-Droid/src/org/fdroid/fdroid/AppDetails.java b/F-Droid/src/org/fdroid/fdroid/AppDetails.java index fcd023c43..ddfdfe1ed 100644 --- a/F-Droid/src/org/fdroid/fdroid/AppDetails.java +++ b/F-Droid/src/org/fdroid/fdroid/AppDetails.java @@ -1314,11 +1314,9 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A final TextView antiFeaturesView = (TextView) view.findViewById(R.id.antifeatures); if (app.antiFeatures != null) { StringBuilder sb = new StringBuilder(); - for (final String af : app.antiFeatures) { - final String afdesc = descAntiFeature(af); - if (afdesc != null) { - sb.append("\t• ").append(afdesc).append('\n'); - } + for (String af : app.antiFeatures) { + String afdesc = descAntiFeature(af); + sb.append("\t• ").append(afdesc).append('\n'); } if (sb.length() > 0) { sb.setLength(sb.length() - 1); @@ -1375,8 +1373,9 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A return getString(R.string.antinonfreedeplist); case "UpstreamNonFree": return getString(R.string.antiupstreamnonfreelist); + default: + return af; } - return null; } public void updateViews(View view) {