do not highlight dictionaries that are not downloaded

Julien LepillerThu Jun 04 00:58:08+0200 2020

5b94157

do not highlight dictionaries that are not downloaded

CHANGELOG.md

11
Changelog
22
=========
33
4+
Changes Since 0.2.2.1
5+
---------------------
6+
7+
### Bug Fixes
8+
9+
* Do not highlight dictionaries that have not been downloaded, even if there is
10+
  a new version.
11+
412
Changes In 0.2.2.1
513
------------------
614

app/src/main/java/eu/lepiller/nani/dictionary/DictionariesAdapter.java

6060
6161
        name_view.setText(dictionary.getName());
6262
        description_view.setText(dictionary.getDescription());
63-
        if(!dictionary.isUpToDate())
63+
        if(!dictionary.isUpToDate() && dictionary.isDownloaded())
6464
            convertView.setBackgroundColor(context.getResources().getColor(R.color.colorUpdate));
6565
        else
6666
            convertView.setBackgroundColor(0);

7474
        else
7575
            size_view.setText(String.format(context.getString(R.string.dictionary_expected_size_mb), nf.format(size/1000000)));
7676
77-
        int entries = dictionary.getExpectedEntries();  
77+
        int entries = dictionary.getExpectedEntries();
7878
        entry_count_view.setText(context.getResources().getQuantityString(R.plurals.dico_entry_count, entries, nf.format(entries)));
7979
8080
        // Return the completed view to render on screen