Add additional group terminate checks.

This commit is contained in:
Cody Henthorne
2026-03-24 16:12:45 -04:00
parent d97bde3959
commit c81f40eb74
20 changed files with 201 additions and 47 deletions

View File

@@ -101,6 +101,19 @@ public class TypingStatusRepository {
return threadsNotifier;
}
public synchronized void stopAllTypingForThread(long threadId) {
Set<Typist> typists = typistMap.remove(threadId);
if (typists != null) {
for (Typist typist : typists) {
Runnable timer = timers.remove(typist);
if (timer != null) {
ThreadUtil.cancelRunnableOnMain(timer);
}
}
notifyThread(threadId, Collections.emptySet(), false);
}
}
public synchronized void clear() {
TypingState empty = new TypingState(Collections.emptyList(), false);
for (MutableLiveData<TypingState> notifier : notifiers.values()) {