From c83e4cc7a35efbb37d3f89ef77e649f35abbd53c Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 8 Dec 2010 05:51:26 -0800 Subject: [PATCH] all places where dict lang is displayed can also display word count --- .../org/eehouse/android/xw4/DictLangCache.java | 18 ++++-------------- .../org/eehouse/android/xw4/DictsActivity.java | 3 +-- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictLangCache.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictLangCache.java index 4fb531748..7e4140b13 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictLangCache.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictLangCache.java @@ -34,15 +34,11 @@ public class DictLangCache { new HashMap(); private static String[] s_langNames; - public static String annotatedDictName( Context context, final String name, - boolean inclNWords ) + public static String annotatedDictName( Context context, String name ) { - int wordCount = 0; - if ( inclNWords ) { - DictInfo info = getInfo( context, name ); - wordCount = info.wordCount; - } - + DictInfo info = getInfo( context, name ); + int wordCount = info.wordCount; + String langName = getLangName( context, name ); String result; if ( 0 == wordCount ) { @@ -54,12 +50,6 @@ public class DictLangCache { return result; } - public static String annotatedDictName( Context context, - String name ) - { - return annotatedDictName( context, name, false ); - } - public static String annotatedDictName( Context context, String name, int lang ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java index c81916cd7..0deb6c5ec 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java @@ -65,8 +65,7 @@ public class DictsActivity extends XWListActivity // append language name view.setText( DictLangCache. annotatedDictName( DictsActivity.this, - m_dicts[position], - true ) ); + m_dicts[position] ) ); if ( !GameUtils.dictIsBuiltin( DictsActivity.this, m_dicts[position] ) ) { view.setDeleteCallback( DictsActivity.this );