Teams CRUD
This commit is contained in:
@@ -133,10 +133,11 @@ class TypingIndicatorController extends StateNotifier<TypingIndicatorState> {
|
||||
|
||||
void userTyping() {
|
||||
if (_disposed || !mounted) {
|
||||
if (kDebugMode)
|
||||
if (kDebugMode) {
|
||||
debugPrint(
|
||||
'TypingIndicatorController.userTyping() ignored after dispose',
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (_client.auth.currentUser?.id == null) return;
|
||||
@@ -144,10 +145,11 @@ class TypingIndicatorController extends StateNotifier<TypingIndicatorState> {
|
||||
_typingTimer?.cancel();
|
||||
_typingTimer = Timer(const Duration(milliseconds: 150), () {
|
||||
if (_disposed || !mounted) {
|
||||
if (kDebugMode)
|
||||
if (kDebugMode) {
|
||||
debugPrint(
|
||||
'TypingIndicatorController._typingTimer callback ignored after dispose',
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
_sendTypingEvent('stop');
|
||||
@@ -156,10 +158,11 @@ class TypingIndicatorController extends StateNotifier<TypingIndicatorState> {
|
||||
|
||||
void stopTyping() {
|
||||
if (_disposed || !mounted) {
|
||||
if (kDebugMode)
|
||||
if (kDebugMode) {
|
||||
debugPrint(
|
||||
'TypingIndicatorController.stopTyping() ignored after dispose',
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
_typingTimer?.cancel();
|
||||
@@ -182,10 +185,11 @@ class TypingIndicatorController extends StateNotifier<TypingIndicatorState> {
|
||||
_remoteTimeouts[userId]?.cancel();
|
||||
_remoteTimeouts[userId] = Timer(const Duration(milliseconds: 400), () {
|
||||
if (_disposed || !mounted) {
|
||||
if (kDebugMode)
|
||||
if (kDebugMode) {
|
||||
debugPrint(
|
||||
'TypingIndicatorController.remote timeout callback ignored after dispose for user: $userId',
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
_clearRemoteTyping(userId);
|
||||
@@ -194,10 +198,11 @@ class TypingIndicatorController extends StateNotifier<TypingIndicatorState> {
|
||||
|
||||
void _clearRemoteTyping(String userId) {
|
||||
if (_disposed || !mounted) {
|
||||
if (kDebugMode)
|
||||
if (kDebugMode) {
|
||||
debugPrint(
|
||||
'TypingIndicatorController._clearRemoteTyping ignored after dispose for user: $userId',
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
final updated = {...state.userIds}..remove(userId);
|
||||
|
||||
Reference in New Issue
Block a user