do grace period calculation only on positive periods
1 files changed, 4 insertions(+), 2 deletions(-) M src/main/java/eu/siacs/conversations/entities/Account.java
M src/main/java/eu/siacs/conversations/entities/Account.java => src/main/java/eu/siacs/conversations/entities/Account.java +4 -2
@@ 604,8 604,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() {