forked from eatvio/eatvio_app
feat(profile): add subscribers and subscriptions
This commit is contained in:
@@ -13,7 +13,7 @@ class ChatSelectCubit extends Cubit<ChatSelectState> {
|
||||
emit(ChatSelectState.loading());
|
||||
try {
|
||||
emit(ChatSelectState.loaded(
|
||||
chatRooms: (await chatRepository.getChatRoomPreiews(query: query)),
|
||||
chatRooms: (await chatRepository.getChatRoomPreviews(query: query)),
|
||||
));
|
||||
} catch (e) {
|
||||
emit(
|
||||
|
||||
@@ -55,7 +55,7 @@ class ChatRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<ChatRoom>> getChatRoomPreiews({String? query}) async {
|
||||
Future<List<ChatRoom>> getChatRoomPreviews({String? query}) async {
|
||||
try {
|
||||
return (await chatService.getChatRoomPreviews(query: query)).chatRooms;
|
||||
} catch (e) {
|
||||
@@ -81,4 +81,13 @@ class ChatRepository {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<ChatRoomModel> getChatRoomIdByUserSlug({required String slug}) async {
|
||||
try {
|
||||
return (await chatService.getChatRoomIdByUserSlug(user: slug));
|
||||
} catch (e) {
|
||||
print(e);
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user