feat(chat, feed): add images, chat search, likes reply to comment

This commit is contained in:
mso7nueh
2024-08-21 16:24:53 +03:00
parent 892fdbebb8
commit 8349778e48
24 changed files with 2213 additions and 445 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:eatvio_app/features/chat/models/chat_room_preview_model.dart';
import 'package:http_parser/http_parser.dart';
import 'package:eatvio_app/features/chat/models/chat_messages_model.dart';
import 'package:eatvio_app/features/chat/models/chat_room_model.dart';
@@ -53,6 +54,15 @@ class ChatRepository {
}
}
Future<List<ChatRoom>> getChatRoomPreiews({String? query}) async {
try {
return (await chatService.getChatRoomPreviews(query: query)).chatRooms;
} catch (e) {
print(e);
rethrow;
}
}
Future<ChatMessagesModel> getChatMessages(String chatId, int page) async {
try {
return (await chatService.getChatMessages(id: chatId, page: page));