]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Refine handling of broken dictionaries.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 14 Dec 2015 23:45:16 +0000 (00:45 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 14 Dec 2015 23:45:16 +0000 (00:45 +0100)
src/com/hughes/android/dictionary/DictionaryManagerActivity.java

index 13dc94f482df5efad563540432b3f772d2fb423f..8ec7d2c0e7aa579e021f563474743b42045f63e0 100644 (file)
@@ -579,13 +579,15 @@ public class DictionaryManagerActivity extends ActionBarActivity {
             builder.append(getString(R.string.indexInfo, indexInfo.shortName,
                     indexInfo.mainTokenCount));
         }
-        if (downloadable != null) {
+        if (downloadable != null || dictionaryInfo != null) {
             builder.append("; ");
-            builder.append(getString(R.string.downloadButton, downloadable.uncompressedBytes / 1024.0 / 1024.0));
+            builder.append(getString(R.string.downloadButton, (dictionaryInfo != null ? dictionaryInfo.uncompressedBytes : downloadable.uncompressedBytes) / 1024.0 / 1024.0));
         }
         if (broken) {
             name.setText("Broken: " + application.getDictionaryName(dictionaryInfo.uncompressedFilename));
             builder.append("; Cannot be used, redownload, check hardware/file system");
+            // Allow deleting, but cannot open
+            row.setLongClickable(true);
         }
         details.setText(builder.toString());