Восстановил поломанную отправку и печать
This commit is contained in:
@@ -329,6 +329,11 @@ class ChatDetailViewModel @Inject constructor(
|
||||
}
|
||||
}
|
||||
is ChatEvent.UserTyping -> {
|
||||
// Игнорируем свои же typing события
|
||||
if (event.userId == getCurrentUserId()) {
|
||||
android.util.Log.d("ChatDetailVM", "Ignoring own typing event")
|
||||
return@onEach
|
||||
}
|
||||
_state.update { it.copy(isTyping = true) }
|
||||
typingTimerJob?.cancel()
|
||||
typingTimerJob = viewModelScope.launch {
|
||||
@@ -337,6 +342,11 @@ class ChatDetailViewModel @Inject constructor(
|
||||
}
|
||||
}
|
||||
is ChatEvent.UserStoppedTyping -> {
|
||||
// Игнорируем свои же события
|
||||
if (event.userId == getCurrentUserId()) {
|
||||
android.util.Log.d("ChatDetailVM", "Ignoring own stopped typing event")
|
||||
return@onEach
|
||||
}
|
||||
_state.update { it.copy(isTyping = false) }
|
||||
}
|
||||
is ChatEvent.MessagesRead -> {
|
||||
|
||||
Reference in New Issue
Block a user