summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
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;
+ }
}