fix: reload space analytics on room change
This commit is contained in:
parent
ce627df835
commit
7f1bd37606
1 changed files with 14 additions and 0 deletions
|
|
@ -215,6 +215,20 @@ class SpaceAnalyticsState extends State<SpaceAnalytics> {
|
|||
_initialize();
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant SpaceAnalytics oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (oldWidget.roomId != widget.roomId) {
|
||||
initialized = false;
|
||||
selectedLanguage = null;
|
||||
downloads = {};
|
||||
_lastUpdated = null;
|
||||
_profiles.clear();
|
||||
_langsToUsers.clear();
|
||||
_initialize();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _initialize() async {
|
||||
await room?.requestParticipants(
|
||||
[Membership.join, Membership.invite, Membership.knock],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue