Do not send typing indicator when deleting from the end & send stopped typing indicator when compose completely empty.

This commit is contained in:
Alan Evans
2020-11-11 15:14:54 -04:00
committed by Cody Henthorne
parent 6a59974f89
commit 3bb366ee04
9 changed files with 92 additions and 63 deletions

View File

@@ -2,9 +2,9 @@ package org.thoughtcrime.securesms.components;
import android.annotation.SuppressLint;
import android.content.Context;
import androidx.annotation.NonNull;
import org.thoughtcrime.securesms.ApplicationContext;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
import org.thoughtcrime.securesms.jobs.TypingSendJob;
import org.thoughtcrime.securesms.util.Util;
@@ -54,6 +54,10 @@ public class TypingStatusSender {
onTypingStopped(threadId, false);
}
public synchronized void onTypingStoppedWithNotify(long threadId) {
onTypingStopped(threadId, true);
}
private synchronized void onTypingStopped(long threadId, boolean notify) {
TimerPair pair = Util.getOrDefault(selfTypingTimers, threadId, new TimerPair());
selfTypingTimers.put(threadId, pair);