aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java b/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java
index bda3f770..3edaad0d 100644
--- a/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java
@@ -15,6 +15,7 @@ import de.thedevstack.conversationsplus.entities.Contact;
import de.thedevstack.conversationsplus.entities.Conversation;
import de.thedevstack.conversationsplus.entities.Downloadable;
import de.thedevstack.conversationsplus.entities.Message;
+import de.thedevstack.conversationsplus.entities.Presences;
import de.thedevstack.conversationsplus.xmpp.jid.Jid;
import android.content.Context;
@@ -354,6 +355,20 @@ public class UIHelper {
}
}
+ public static String getStatusColor(int status) {
+ switch (status) {
+ case Presences.ONLINE:
+ case Presences.CHAT:
+ return "#259B23";
+ case Presences.AWAY:
+ case Presences.XA:
+ return "#FF9800";
+ case Presences.DND:
+ return "#E51C23";
+ }
+ return "#CCCCCC";
+ }
+
private static String getDisplayedMucCounterpart(final Jid counterpart) {
if (counterpart==null) {
return "";