From 7e06d0f578694f302128e6a9131ad3d1a324bb78 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 11 Jul 2022 10:48:22 +0200 Subject: [PATCH 1/2] 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, From 402e0811be1f3c1b2c9a900ec6cada91f03091e4 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 11 Jul 2022 10:48:45 +0200 Subject: [PATCH 2/2] chore: Bump version --- CHANGELOG.md | 3 +++ pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 580e10d6..71fa655f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.10.5] - 11th Jul 2022 +- fix: Cache user profile even with cache=false when there is a cache + ## [0.10.4] - 11th Jul 2022 - refactor: Better fetch own profile (Christian Pauly) diff --git a/pubspec.yaml b/pubspec.yaml index 86e4bea5..50f7332a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: matrix description: Matrix Dart SDK -version: 0.10.4 +version: 0.10.5 homepage: https://famedly.com repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git