forked from eatvio/eatvio_app
feat(chat, feed): add images, chat search, likes reply to comment
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user