Fix a bug with a duplicate entry

When going to the "all languages" dictionary and opening an
entry, the "all languages" entry would be listed twice.

Change-Id: Ie8cd7e9e824e95c05899b956905af6590b8929bc
This commit is contained in:
Jean Chalard
2012-05-09 20:30:02 +09:00
parent 5bdde7f939
commit f14002ca6b

View File

@@ -184,7 +184,10 @@ public class UserDictionaryAddWordContents {
// TODO: sort in unicode order
addLocaleDisplayNameToList(activity, localesList, l);
}
localesList.add(new LocaleRenderer(activity, "")); // meaning: all languages
if (!"".equals(mLocale)) {
// If mLocale is "", then we already inserted the "all languages" item, so don't do it
addLocaleDisplayNameToList(activity, localesList, ""); // meaning: all languages
}
localesList.add(new LocaleRenderer(activity, null)); // meaning: select another locale
return localesList;
}