Merge pull request #239 from pangeachat/concurrent-modification-fix

fix for concurrent modification of list error
This commit is contained in:
ggurdin 2024-05-23 09:39:35 -04:00 committed by GitHub
commit 6eb9f8c9d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,7 +25,8 @@ extension PangeaClient on Client {
.toList();
Future<List<Room>> get classesAndExchangesImTeaching async {
for (final Room space in rooms.where((room) => room.isSpace)) {
final allSpaces = rooms.where((room) => room.isSpace);
for (final Room space in allSpaces) {
if (space.getState(EventTypes.RoomPowerLevels) == null) {
await space.postLoad();
}