Mark conversation (un)seen on double tap

pull/159/head
M66B 6 years ago
parent ccb6c259a4
commit e0d35792b2

@ -1485,10 +1485,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
db.beginTransaction(); db.beginTransaction();
EntityMessage message = db.message().getMessage(id); EntityMessage message = db.message().getMessage(id);
if (message == null) if (message != null) {
return null; List<EntityMessage> messages = db.message().getMessageByThread(
message.account, message.thread, threading ? null : id, null);
EntityOperation.queue(context, message, EntityOperation.SEEN, !message.ui_seen); for (EntityMessage threaded : messages)
if (threaded.ui_seen == message.ui_seen)
EntityOperation.queue(context, threaded, EntityOperation.SEEN, !message.ui_seen);
}
db.setTransactionSuccessful(); db.setTransactionSuccessful();
} finally { } finally {
@ -1503,8 +1506,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Helper.unexpectedError(parentFragment.getFragmentManager(), ex); Helper.unexpectedError(parentFragment.getFragmentManager(), ex);
} }
}.execute(context, owner, args, "message:seen"); }.execute(context, owner, args, "message:seen");
} }
} }
} }

Loading…
Cancel
Save