18 lines
568 B
Dart
18 lines
568 B
Dart
import '../../../requestCache.dart';
|
|
import 'getParticipants.dart';
|
|
import 'getParticipantsResponse.dart';
|
|
|
|
class GetParticipantsCache extends SimpleCache<GetParticipantsResponse> {
|
|
GetParticipantsCache({
|
|
required void Function(GetParticipantsResponse) onUpdate,
|
|
required String chatToken,
|
|
}) : super(
|
|
cacheTime: RequestCache.cacheNothing,
|
|
loader: () => GetParticipants(chatToken).run(),
|
|
fromJson: GetParticipantsResponse.fromJson,
|
|
onUpdate: onUpdate,
|
|
) {
|
|
start('nc-chat-participants-$chatToken');
|
|
}
|
|
}
|