~singpolyma/cheogram-android

02b7b0b4a699acd944e6f73ecb7d4fe5252ee410 — Daniel Gultsch 5 years ago 8f057a0
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() {