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.
This commit is contained in:
Daniel Martí 2015-12-29 12:32:21 +01:00
parent 975ce94246
commit 0a0dc0d596

View File

@ -1314,11 +1314,9 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
final TextView antiFeaturesView = (TextView) view.findViewById(R.id.antifeatures); final TextView antiFeaturesView = (TextView) view.findViewById(R.id.antifeatures);
if (app.antiFeatures != null) { if (app.antiFeatures != null) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (final String af : app.antiFeatures) { for (String af : app.antiFeatures) {
final String afdesc = descAntiFeature(af); String afdesc = descAntiFeature(af);
if (afdesc != null) { sb.append("\t• ").append(afdesc).append('\n');
sb.append("\t• ").append(afdesc).append('\n');
}
} }
if (sb.length() > 0) { if (sb.length() > 0) {
sb.setLength(sb.length() - 1); sb.setLength(sb.length() - 1);
@ -1375,8 +1373,9 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
return getString(R.string.antinonfreedeplist); return getString(R.string.antinonfreedeplist);
case "UpstreamNonFree": case "UpstreamNonFree":
return getString(R.string.antiupstreamnonfreelist); return getString(R.string.antiupstreamnonfreelist);
default:
return af;
} }
return null;
} }
public void updateViews(View view) { public void updateViews(View view) {