From 7e06d0f578694f302128e6a9131ad3d1a324bb78 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 11 Jul 2022 10:48:22 +0200 Subject: [PATCH] fix: Cache user profile even with cache=false when there is a cache --- lib/src/client.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 68a57931..7adb57a2 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -769,7 +769,9 @@ class Client extends MatrixApi { } } profile = await getUserProfile(userId); - if (cache) _profileCache[userId] = profile; + if (cache || _profileCache.containsKey(userId)) { + _profileCache[userId] = profile; + } return Profile( userId: userId, displayName: profile.displayname,