use lang name, not code, to build download URL. Fixes download of Experimental lists.

This commit is contained in:
Eric House 2014-06-24 07:19:43 -07:00
parent 40d63be58b
commit c82ec8b646
2 changed files with 14 additions and 8 deletions

View file

@ -986,11 +986,10 @@ public class DictsDelegate extends ListDelegateBase
Button button = (Button)view.findViewById( R.id.download_button );
button.setOnClickListener( new View.OnClickListener() {
public void onClick( View view ) {
int langCode = DictLangCache.getLangLangCode( m_activity,
info.m_lang );
DwnldDelegate.downloadDictInBack( m_activity, langCode,
info.m_name,
DictsDelegate.this );
DwnldDelegate.
downloadDictInBack( m_activity, info.m_lang,
info.m_name,
DictsDelegate.this );
}
} );

View file

@ -346,14 +346,21 @@ public class DwnldDelegate extends ListDelegateBase {
}
}
public static void downloadDictInBack( Context context, String langName,
String name,
DownloadFinishedListener lstnr )
{
String url = Utils.makeDictUrl( context, langName, name );
// DbgUtils.logf( "downloadDictInBack(lang=%s): url=%s", langName, url );
downloadDictInBack( context, url, lstnr );
}
public static void downloadDictInBack( Context context, int lang,
String name,
DownloadFinishedListener lstnr )
{
String url = Utils.makeDictUrl( context, lang, name );
// if ( null != lstnr ) {
// rememberListener( url, name, lstnr );
// }
// DbgUtils.logf( "downloadDictInBack(lang=%d): url=%s", lang, url );
downloadDictInBack( context, url, lstnr );
}