Merge branch 'krille/fix-cache-user-profile' into 'main'

Krille/fix cache user profile

See merge request famedly/company/frontend/famedlysdk!1077
This commit is contained in:
Krille Fear 2022-07-11 09:54:52 +00:00
commit 0b031476b8
3 changed files with 7 additions and 2 deletions

View File

@ -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 ## [0.10.4] - 11th Jul 2022
- refactor: Better fetch own profile (Christian Pauly) - refactor: Better fetch own profile (Christian Pauly)

View File

@ -769,7 +769,9 @@ class Client extends MatrixApi {
} }
} }
profile = await getUserProfile(userId); profile = await getUserProfile(userId);
if (cache) _profileCache[userId] = profile; if (cache || _profileCache.containsKey(userId)) {
_profileCache[userId] = profile;
}
return Profile( return Profile(
userId: userId, userId: userId,
displayName: profile.displayname, displayName: profile.displayname,

View File

@ -1,6 +1,6 @@
name: matrix name: matrix
description: Matrix Dart SDK description: Matrix Dart SDK
version: 0.10.4 version: 0.10.5
homepage: https://famedly.com homepage: https://famedly.com
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git