Skip to content

Commit

Permalink
Merge pull request #239 from pangeachat/concurrent-modification-fix
Browse files Browse the repository at this point in the history
fix for concurrent modification of list error
  • Loading branch information
ggurdin authored May 23, 2024
2 parents e25b90c + 340e90a commit 6eb9f8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pangea/extensions/client_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 6eb9f8c

Please sign in to comment.