diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities/Account.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Account.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Account.java b/src/main/java/de/pixart/messenger/entities/Account.java index 9e3711535..1bdd130d5 100644 --- a/src/main/java/de/pixart/messenger/entities/Account.java +++ b/src/main/java/de/pixart/messenger/entities/Account.java @@ -73,6 +73,7 @@ public class Account extends AbstractEntity { protected String password; protected int options = 0; protected State status = State.OFFLINE; + private State lastErrorStatus = State.OFFLINE; protected String resource; protected String avatar; protected String hostname = null; @@ -271,8 +272,15 @@ public class Account extends AbstractEntity { } } + public State getLastErrorStatus() { + return this.lastErrorStatus; + } + public void setStatus(final State status) { this.status = status; + if (status.isError || status == State.ONLINE) { + this.lastErrorStatus = status; + } } public State getTrueStatus() { |