aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2015-05-26 22:30:41 +0200
committerlookshe <github@lookshe.org>2015-06-19 09:47:04 +0200
commita7121b51b8239a695dc685adaaf207d61170fee4 (patch)
tree28dda5f1f0906681e3b48295c584c9a4e960756b /src
parentb6584dfd0b3a7347c7788143fda486f18a1518ee (diff)
Show Online status in contact list with respect to SHOW_ONLINE_STATUS preference
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java
index c453416a..4b70417e 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/ListItemAdapter.java
@@ -9,6 +9,7 @@ import de.thedevstack.conversationsplus.entities.ListItem;
import de.thedevstack.conversationsplus.ui.XmppActivity;
import de.thedevstack.conversationsplus.utils.UIHelper;
import de.thedevstack.conversationsplus.xmpp.jid.Jid;
+import de.tzur.conversations.Settings;
import android.content.Context;
import android.content.SharedPreferences;
@@ -58,8 +59,10 @@ public class ListItemAdapter extends ArrayAdapter<ListItem> {
view = inflater.inflate(R.layout.contact, parent, false);
}
- TextView tvStatus = (TextView) view.findViewById(R.id.contact_status);
- tvStatus.setBackgroundColor(item.getStatusColor());
+ if (Settings.SHOW_ONLINE_STATUS) {
+ TextView tvStatus = (TextView) view.findViewById(R.id.contact_status);
+ tvStatus.setBackgroundColor(item.getStatusColor());
+ }
TextView tvName = (TextView) view.findViewById(R.id.contact_display_name);
TextView tvJid = (TextView) view.findViewById(R.id.contact_jid);