Load room details on appearance. Avoid overwhelming the rust runtime and slow down the room timeline loading.

This commit is contained in:
Stefan Ceriu
2022-03-16 14:52:25 +02:00
parent 59e42ec938
commit 43f78d0a26
7 changed files with 65 additions and 29 deletions
@@ -114,7 +114,6 @@ struct RoomCell: View {
.frame(width: 40, height: 40)
.mask(Circle())
} else {
let _ = context.send(viewAction: .loadRoomData(roomIdentifier: room.id))
Image(systemName: "person.3")
.frame(width: 40, height: 40)
}
@@ -140,6 +139,9 @@ struct RoomCell: View {
}
}
.frame(minHeight: 60.0)
.onAppear {
context.send(viewAction: .loadRoomData(roomIdentifier: room.id))
}
}
}