diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-08-26 14:55:21 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-08-26 14:55:21 +0200 |
commit | 2ae0ecec3a947776be2355b1fbfc9b0334b59fc3 (patch) | |
tree | 42caabcc2edabb30c09cae321c151a69b7e41b87 /src/main | |
parent | dbee1d4f49a60db94b21586bd22cdf7213d17c3b (diff) |
do grace period calculation only on positive periods
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Account.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Account.java b/src/main/java/de/pixart/messenger/entities/Account.java index a8c72cdf9..46d036419 100644 --- a/src/main/java/de/pixart/messenger/entities/Account.java +++ b/src/main/java/de/pixart/messenger/entities/Account.java @@ -638,8 +638,10 @@ public class Account extends AbstractEntity { return this.avatar; } - public void activateGracePeriod(long duration) { - this.mEndGracePeriod = SystemClock.elapsedRealtime() + duration; + public void activateGracePeriod(final long duration) { + if (duration > 0) { + this.mEndGracePeriod = SystemClock.elapsedRealtime() + duration; + } } public void deactivateGracePeriod() { |