summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-03-24 19:50:26 +0100
committerParménides GV <parmegv@sdf.org>2015-03-24 19:50:26 +0100
commita8b4c47e44ea7f2eb6f0c032af344fb04b255694 (patch)
treed55dcb067425b0fe0cda84277efecadca6f6dd76 /app/src
parent6954d5a4d7739b472ba74bacac76d30aa9e065c9 (diff)
Conjugate the verb to be in user session status.
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/UserSessionStatus.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/UserSessionStatus.java b/app/src/main/java/se/leap/bitmaskclient/UserSessionStatus.java
index 369df1a3..e43c8a25 100644
--- a/app/src/main/java/se/leap/bitmaskclient/UserSessionStatus.java
+++ b/app/src/main/java/se/leap/bitmaskclient/UserSessionStatus.java
@@ -68,7 +68,20 @@ public class UserSessionStatus extends Observable {
@Override
public String toString() {
- return User.userName() + " is "
+ String username = User.userName();
+
+ return username + " " + conjugateToBe(username) + " "
+ session_status.toString().toLowerCase().replaceAll("_", " ");
}
+
+ private String conjugateToBe(String subject) {
+ String conjugation = "";
+ if(subject.equalsIgnoreCase("I"))
+ conjugation = "am";
+ else if(subject.equalsIgnoreCase("you") || subject.equalsIgnoreCase("we")|| subject.equalsIgnoreCase("they"))
+ conjugation = "are";
+ else conjugation = "is";
+
+ return conjugation;
+ }
}