From a8b4c47e44ea7f2eb6f0c032af344fb04b255694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 24 Mar 2015 19:50:26 +0100 Subject: Conjugate the verb to be in user session status. --- .../java/se/leap/bitmaskclient/UserSessionStatus.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'app') 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; + } } -- cgit v1.2.3