diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-03 12:36:54 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-03 12:36:54 +0200 |
commit | 1a09a4706b7cc53225abd5c6124f3da2f784ad61 (patch) | |
tree | bb48f68460379c2d73ccce5bdd78b059b3a48358 /src/eu/siacs/conversations/entities | |
parent | 1f378bffc80c73d23cb62106c912043504ce7fca (diff) |
added ability to disable notifications for specific conversations - fixed #322
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/entities/Conversation.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java index 8dc9b3ca..2097b2a4 100644 --- a/src/eu/siacs/conversations/entities/Conversation.java +++ b/src/eu/siacs/conversations/entities/Conversation.java @@ -16,6 +16,7 @@ import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.graphics.Bitmap; +import android.os.SystemClock; public class Conversation extends AbstractEntity { public static final String TABLENAME = "conversations"; @@ -42,6 +43,8 @@ public class Conversation extends AbstractEntity { private int status; private long created; private int mode; + + private long mutedTill = 0; private String nextPresence; @@ -418,4 +421,12 @@ public class Conversation extends AbstractEntity { } return false; } + + public void setMutedTill(long mutedTill) { + this.mutedTill = mutedTill; + } + + public boolean isMuted() { + return SystemClock.elapsedRealtime() < this.mutedTill; + } } |