mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-20 06:47:06 -04:00
[app] Don't show summary if null
Originally, we were showing "Unknown application" in English, no matter the user's locale. Then here we were actually showing "null". Both isn't good, so best to not show anything.
This commit is contained in:
committed by
Hans-Christoph Steiner
parent
477436af68
commit
5cfdae0719
@@ -604,8 +604,9 @@ public final class Utils {
|
||||
* "sans-serif-light". Doesn't mandate any font sizes or any other styles, that is up to the
|
||||
* {@link android.widget.TextView} which it ends up being displayed in.
|
||||
*/
|
||||
public static CharSequence formatAppNameAndSummary(String appName, String summary) {
|
||||
String toFormat = appName + ' ' + summary;
|
||||
public static CharSequence formatAppNameAndSummary(String appName, @Nullable String summary) {
|
||||
String toFormat = appName;
|
||||
if (summary != null) toFormat += ' ' + summary;
|
||||
CharacterStyle normal = new TypefaceSpan("sans-serif");
|
||||
CharacterStyle light = new TypefaceSpan("sans-serif-light");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user