updated error handling, consultant rating layout and complaining logic

This commit is contained in:
Username1548
2025-02-28 19:18:01 +07:00
parent e5b293db79
commit 0cdd40102f
86 changed files with 3853 additions and 279 deletions

View File

@@ -1,8 +1,10 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'package:audioplayers/audioplayers.dart';
import 'package:dart_pusher_channels/dart_pusher_channels.dart';
import 'package:easy_debounce/easy_debounce.dart';
import 'package:eatvio_app/core/image_compressing/image_compress_utility.dart';
import 'package:eatvio_app/core/websockets/ws_manager.dart';
@@ -15,6 +17,8 @@ class ChatRoomCubit extends Cubit<ChatRoomState> {
final ChatRepository chatRepository;
final WsManager wsManager;
StreamSubscription<ChannelReadEvent>? typingSubscription;
StreamSubscription<ChannelReadEvent>? messagesSubscription;
int currentPage = 1;
late final int lastPage;
bool isLoading = false;
@@ -75,6 +79,9 @@ class ChatRoomCubit extends Cubit<ChatRoomState> {
),
);
} catch (e) {
typingSubscription?.cancel();
messagesSubscription?.cancel();
wsManager.unsubscribeDirectChatChannel();
emit(ChatRoomState.error(errorMessage: 'Ошибка получеия данных'));
}
}

View File

@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:convert';
import 'package:eatvio_app/core/utils/enums.dart';
import 'package:eatvio_app/core/enums/base_state.dart';
import 'package:eatvio_app/core/websockets/ws_manager.dart';
import 'package:eatvio_app/features/chat/models/chat_message_model.dart';
import 'package:eatvio_app/features/chat/presentation/bloc/chats_cubit/chats_state.dart';

View File

@@ -1,4 +1,4 @@
import 'package:eatvio_app/core/utils/enums.dart';
import 'package:eatvio_app/core/enums/base_state.dart';
import 'package:eatvio_app/features/chat/models/chat_room_preview_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';