Skip to content

Commit

Permalink
update touched on message delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Sep 2, 2019
1 parent 46a7ea5 commit 5982d2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tinodesdk/src/main/java/co/tinode/tinodesdk/Topic.java
Original file line number Diff line number Diff line change
Expand Up @@ -802,16 +802,17 @@ private void processDelivery(final MsgServerCtrl ctrl, final long id) {
int seq = ctrl.getIntParam("seq", 0);
if (seq > 0) {
setSeq(seq);
setTouched(ctrl.ts);
if (id > 0 && mStore != null) {
if (mStore.msgDelivered(Topic.this, id, ctrl.ts, seq)) {
if (mStore.msgDelivered(this, id, ctrl.ts, seq)) {
setRecv(seq);
}
} else {
setRecv(seq);
}
setRead(seq);
if (mStore != null) {
mStore.setRead(Topic.this, seq);
mStore.setRead(this, seq);
}
}
}
Expand Down

0 comments on commit 5982d2c

Please sign in to comment.