fix: reload space analytics on room change

This commit is contained in:
ggurdin 2025-11-05 14:43:30 -05:00
parent ce627df835
commit 7f1bd37606
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -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],