summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-03-24 19:51:10 +0100
committerParménides GV <parmegv@sdf.org>2015-03-24 19:51:10 +0100
commit8cd10bcac50a7e76085d5d7384dc8910a80e44c6 (patch)
treed55dcb067425b0fe0cda84277efecadca6f6dd76 /app/src/main/java
parent6954d5a4d7739b472ba74bacac76d30aa9e065c9 (diff)
parenta8b4c47e44ea7f2eb6f0c032af344fb04b255694 (diff)
Merge branch 'bug/typo-you-is-not-logged-in-#6800' into develop
Diffstat (limited to 'app/src/main/java')
-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;
+ }
}