FurryChat/lib/utils/client_presence_extension.dart
Christian Pauly bcda0bbd5f Fix top list
2020-06-19 15:10:26 +02:00

11 lines
328 B
Dart

import 'package:famedlysdk/famedlysdk.dart';
extension ClientPresenceExtension on Client {
static final Map<String, Profile> presencesCache = {};
Future<Profile> requestProfileCached(String senderId) async {
presencesCache[senderId] ??= await getProfileFromUserId(senderId);
return presencesCache[senderId];
}
}