mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
use time instead of uptime for unmute
This commit is contained in:
parent
44ee746681
commit
45de788773
@ -626,8 +626,7 @@ public class Conversation extends AbstractEntity implements Blockable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMuted() {
|
public boolean isMuted() {
|
||||||
return SystemClock.elapsedRealtime() < this.getLongAttribute(
|
return System.currentTimeMillis() < this.getLongAttribute(ATTRIBUTE_MUTED_TILL, 0);
|
||||||
ATTRIBUTE_MUTED_TILL, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setAttribute(String key, String value) {
|
public boolean setAttribute(String key, String value) {
|
||||||
|
@ -12,7 +12,6 @@ import android.content.IntentSender.SendIntentException;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.SystemClock;
|
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.support.v4.widget.SlidingPaneLayout;
|
import android.support.v4.widget.SlidingPaneLayout;
|
||||||
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
|
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
|
||||||
@ -677,8 +676,7 @@ public class ConversationActivity extends XmppActivity
|
|||||||
if (durations[which] == -1) {
|
if (durations[which] == -1) {
|
||||||
till = Long.MAX_VALUE;
|
till = Long.MAX_VALUE;
|
||||||
} else {
|
} else {
|
||||||
till = SystemClock.elapsedRealtime()
|
till = System.currentTimeMillis() + (durations[which] * 1000);
|
||||||
+ (durations[which] * 1000);
|
|
||||||
}
|
}
|
||||||
conversation.setMutedTill(till);
|
conversation.setMutedTill(till);
|
||||||
ConversationActivity.this.xmppConnectionService.databaseBackend
|
ConversationActivity.this.xmppConnectionService.databaseBackend
|
||||||
|
Loading…
Reference in New Issue
Block a user