feat: Implement new status feature
This commit is contained in:
parent
0f056a4b86
commit
c5d84c22ca
10 changed files with 329 additions and 245 deletions
|
|
@ -1,10 +1,7 @@
|
|||
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];
|
||||
}
|
||||
List<Presence> get statuses => presences.values
|
||||
.where((p) => p.presence.statusMsg?.isNotEmpty ?? false)
|
||||
.toList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue