Added details for chats with participants list

This commit is contained in:
2023-09-13 18:57:52 +02:00
parent 3b673537e5
commit 0b48c2e7ab
13 changed files with 380 additions and 20 deletions

View File

@ -0,0 +1,26 @@
import 'dart:convert';
import '../../../requestCache.dart';
import 'getParticipants.dart';
import 'getParticipantsResponse.dart';
class GetParticipantsCache extends RequestCache<GetParticipantsResponse> {
String chatToken;
GetParticipantsCache({required onUpdate, required this.chatToken}) : super(RequestCache.cacheNothing, onUpdate) {
start("MarianumMobile", "nc-chat-participants-$chatToken");
}
@override
Future<GetParticipantsResponse> onLoad() {
return GetParticipants(
chatToken,
).run();
}
@override
GetParticipantsResponse onLocalData(String json) {
return GetParticipantsResponse.fromJson(jsonDecode(json));
}
}