mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
remove marking whole chat as seen; only single messages are marked as seen when they scroll into view
This commit is contained in:
@@ -234,8 +234,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
}
|
||||
});
|
||||
|
||||
dcContext.marknoticedChat(threadId);
|
||||
|
||||
dcContext.eventCenter.addObserver(DcContext.DC_EVENT_CHAT_MODIFIED, this);
|
||||
dcContext.eventCenter.addObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
|
||||
}
|
||||
@@ -299,7 +297,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
inputPanel.onPause();
|
||||
|
||||
fragment.setLastSeen(System.currentTimeMillis());
|
||||
markLastSeen();
|
||||
|
||||
AudioSlidePlayer.stopAll();
|
||||
}
|
||||
|
||||
@@ -851,23 +849,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
new AsyncTask<Integer, Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground(Integer... params) {
|
||||
Context context = ConversationActivity.this;
|
||||
ApplicationDcContext dcContext = DcHelper.getContext(context);
|
||||
int[] messageIds = dcContext.getChatMsgs(((ConversationActivity) context).threadId, 0, 0);
|
||||
dcContext.markseenMsgs(messageIds);
|
||||
|
||||
MessageNotifier.updateNotification(context, threadId, false);
|
||||
|
||||
return null;
|
||||
}
|
||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, threadId);
|
||||
}
|
||||
|
||||
private void markLastSeen() {
|
||||
new AsyncTask<Integer, Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground(Integer... params) {
|
||||
dcContext.marknoticedChat(params[0]);
|
||||
MessageNotifier.updateNotification(ConversationActivity.this, threadId, false);
|
||||
return null;
|
||||
}
|
||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, threadId);
|
||||
|
||||
Reference in New Issue
Block a user