mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-24 08:28:58 -05:00
set last clear date to time of last message
This commit is contained in:
parent
5fae9465d1
commit
3c951ce2cd
@ -3630,9 +3630,15 @@ public class XmppConnectionService extends Service {
|
||||
}
|
||||
|
||||
public void clearConversationHistory(final Conversation conversation) {
|
||||
long clearDate;
|
||||
if (conversation.countMessages() > 0) {
|
||||
clearDate = conversation.getLatestMessage().getTimeSent() + 1000;
|
||||
} else {
|
||||
clearDate = System.currentTimeMillis();
|
||||
}
|
||||
conversation.clearMessages();
|
||||
conversation.setHasMessagesLeftOnServer(false); //avoid messages getting loaded through mam
|
||||
conversation.setLastClearHistory(System.currentTimeMillis());
|
||||
conversation.setLastClearHistory(clearDate);
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
Loading…
Reference in New Issue
Block a user