From 77d747079b9f8251ed17aa1bb16dfa499e0e29d6 Mon Sep 17 00:00:00 2001 From: Helena Rodriguez Date: Fri, 7 Dec 2012 13:38:19 +0100 Subject: [PATCH] Modified information file dialog to show unknown uploader --- SWADroid/res/values-es/strings.xml | 1 + SWADroid/res/values/strings.xml | 1 + .../swadroid/modules/downloads/DownloadsManager.java | 10 ++++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/SWADroid/res/values-es/strings.xml b/SWADroid/res/values-es/strings.xml index 2abd40cc..193f0d84 100644 --- a/SWADroid/res/values-es/strings.xml +++ b/SWADroid/res/values-es/strings.xml @@ -265,5 +265,6 @@ Seleccione: Sesiones de prácticas - Nueva Problema en descarga Lo sentimos. La descarga fue interrumpida. Inténtelo de nuevo Descarga completa + Desconocido diff --git a/SWADroid/res/values/strings.xml b/SWADroid/res/values/strings.xml index f596e19f..ffff8f3f 100644 --- a/SWADroid/res/values/strings.xml +++ b/SWADroid/res/values/strings.xml @@ -276,4 +276,5 @@ configuration anytime using the "Clean Database" option\n\nDo you want to contin Download problem Sorry. The download of file was interrupted. Try again Download completed + Unknown diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DownloadsManager.java b/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DownloadsManager.java index fab4dcda..e7915486 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DownloadsManager.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DownloadsManager.java @@ -453,8 +453,14 @@ public class DownloadsManager extends MenuActivity { Date d = new Date(time * 1000); java.text.DateFormat dateShortFormat = android.text.format.DateFormat.getDateFormat(this); java.text.DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(this); - //TODO show size in appropriate measure - String message =this.getResources().getString(R.string.uploaderTitle) +" " + uploader+ '\n' + + + String uploaderName; + if(uploader.compareTo("") != 0) + uploaderName = uploader; + else + uploaderName = this.getResources().getString(R.string.unknown); + + String message =this.getResources().getString(R.string.uploaderTitle) +" " + uploaderName+ '\n' + this.getResources().getString(R.string.sizeFileTitle) +" " + humanReadableByteCount(size, true) + '\n'+ this.getResources().getString(R.string.creationTimeTitle) +" " + dateShortFormat.format(d)+ " "+(timeFormat.format(d)); builder.setTitle(name);