claude refactor
This commit is contained in:
@@ -8,7 +8,7 @@ import 'getChatResponse.dart';
|
||||
class GetChatCache extends RequestCache<GetChatResponse> {
|
||||
String chatToken;
|
||||
|
||||
GetChatCache({required onUpdate, required this.chatToken}) : super(RequestCache.cacheNothing, onUpdate) {
|
||||
GetChatCache({required void Function(GetChatResponse) onUpdate, required this.chatToken}) : super(RequestCache.cacheNothing, onUpdate) {
|
||||
start('nc-chat-$chatToken');
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class GetChatResponseObject {
|
||||
|
||||
}
|
||||
|
||||
Map<String, RichObjectString>? _fromJson(json) {
|
||||
Map<String, RichObjectString>? _fromJson(dynamic json) {
|
||||
if(json is Map<String, dynamic>) {
|
||||
var data = <String, RichObjectString>{};
|
||||
for (var element in json.keys) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'getParticipantsResponse.dart';
|
||||
class GetParticipantsCache extends RequestCache<GetParticipantsResponse> {
|
||||
String chatToken;
|
||||
|
||||
GetParticipantsCache({required onUpdate, required this.chatToken}) : super(RequestCache.cacheNothing, onUpdate) {
|
||||
GetParticipantsCache({required void Function(GetParticipantsResponse) onUpdate, required this.chatToken}) : super(RequestCache.cacheNothing, onUpdate) {
|
||||
start('nc-chat-participants-$chatToken');
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'getRoomParams.dart';
|
||||
import 'getRoomResponse.dart';
|
||||
|
||||
class GetRoomCache extends RequestCache<GetRoomResponse> {
|
||||
GetRoomCache({onUpdate, renew}) : super(RequestCache.cacheMinute, onUpdate, renew: renew) {
|
||||
GetRoomCache({void Function(GetRoomResponse)? onUpdate, bool? renew}) : super(RequestCache.cacheMinute, onUpdate, renew: renew) {
|
||||
start('nc-rooms');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user