|
|
|
@ -103,22 +103,23 @@ public class TupleMessageEx extends EntityMessage {
|
|
|
|
|
List<String> titles = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
|
|
|
|
for (int i = 0; i < this.keywords.length; i++) {
|
|
|
|
|
String keyword = this.keywords[i];
|
|
|
|
|
|
|
|
|
|
String keyColor1 = "kwcolor." + keyword;
|
|
|
|
|
String keyColor2 = "keyword." + keyword; // legacy
|
|
|
|
|
if (prefs.contains(keyColor1))
|
|
|
|
|
color.add(prefs.getInt(keyColor1, Color.GRAY));
|
|
|
|
|
else if (prefs.contains(keyColor2))
|
|
|
|
|
color.add(prefs.getInt(keyColor2, Color.GRAY));
|
|
|
|
|
else
|
|
|
|
|
color.add(null);
|
|
|
|
|
|
|
|
|
|
String keyTitle = "kwtitle." + keyword;
|
|
|
|
|
String def = TupleKeyword.getDefaultKeywordAlias(context, keyword);
|
|
|
|
|
titles.add(prefs.getString(keyTitle, def));
|
|
|
|
|
}
|
|
|
|
|
if (this.keywords != null)
|
|
|
|
|
for (int i = 0; i < this.keywords.length; i++) {
|
|
|
|
|
String keyword = this.keywords[i];
|
|
|
|
|
|
|
|
|
|
String keyColor1 = "kwcolor." + keyword;
|
|
|
|
|
String keyColor2 = "keyword." + keyword; // legacy
|
|
|
|
|
if (prefs.contains(keyColor1))
|
|
|
|
|
color.add(prefs.getInt(keyColor1, Color.GRAY));
|
|
|
|
|
else if (prefs.contains(keyColor2))
|
|
|
|
|
color.add(prefs.getInt(keyColor2, Color.GRAY));
|
|
|
|
|
else
|
|
|
|
|
color.add(null);
|
|
|
|
|
|
|
|
|
|
String keyTitle = "kwtitle." + keyword;
|
|
|
|
|
String def = TupleKeyword.getDefaultKeywordAlias(context, keyword);
|
|
|
|
|
titles.add(prefs.getString(keyTitle, def));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.keyword_colors = color.toArray(new Integer[0]);
|
|
|
|
|
this.keyword_titles = titles.toArray(new String[0]);
|
|
|
|
|