refactored some code

This commit is contained in:
Chumva 2018-02-27 13:18:53 +02:00
parent b29012009e
commit 5c80c1c791
2 changed files with 2 additions and 4 deletions

View file

@ -266,7 +266,7 @@ public class DownloadFileHelper {
taskName.append(ctx.getString(R.string.shared_string_downloading)).append(": ");
//+ de.baseName /*+ " " + mb + " MB"*/;
taskName.append(FileNameTranslationHelper.getFileName(ctx, ctx.getRegions(), de.baseName));
if (de.type != null && de.type.getString(ctx) != null) {
if (de.type != null) {
taskName.append(" ").append(de.type.getString(ctx));
}
progress.startTask(taskName.toString(), len / 1024);

View file

@ -127,10 +127,8 @@ public class DownloadIndexesThread {
contentText.append(", ");
}
contentText.append(i.getVisibleName(app, app.getRegions()));
if (i.getType() != null) {
contentText.append(" ").append(i.getType().getString(app));
}
}
bld.setContentTitle(msg).setSmallIcon(android.R.drawable.stat_sys_download)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContentText(contentText.toString())