import '../../../requestCache.dart'; import 'getChat.dart'; import 'getChatParams.dart'; import 'getChatResponse.dart'; class GetChatCache extends SimpleCache { GetChatCache({ required void Function(GetChatResponse) onUpdate, super.onError, required String chatToken, }) : super( cacheTime: RequestCache.cacheNothing, loader: () => GetChat( chatToken, GetChatParams( lookIntoFuture: GetChatParamsSwitch.off, setReadMarker: GetChatParamsSwitch.on, limit: 200, ), ).run(), fromJson: GetChatResponse.fromJson, onUpdate: onUpdate, ) { start('nc-chat-$chatToken'); } }