fix: properly overwrite loaded state for partial loaded rooms
Otherwise invites, which get converted to normal rooms, might still have old member events set in memory, that don't match the current state.
This commit is contained in:
parent
5ffa99d994
commit
6f82e92f2c
|
|
@ -2463,6 +2463,10 @@ class Client extends MatrixApi {
|
||||||
final importantOrRoomLoaded =
|
final importantOrRoomLoaded =
|
||||||
eventUpdate.type == EventUpdateType.inviteState ||
|
eventUpdate.type == EventUpdateType.inviteState ||
|
||||||
!room.partial ||
|
!room.partial ||
|
||||||
|
// make sure we do overwrite events we have already loaded.
|
||||||
|
room.states[stateEvent.type]
|
||||||
|
?.containsKey(stateEvent.stateKey ?? '') ==
|
||||||
|
true ||
|
||||||
importantStateEvents.contains(stateEvent.type);
|
importantStateEvents.contains(stateEvent.type);
|
||||||
if ((noMessageOrNoEdit || editingLastEvent || consecutiveEdit) &&
|
if ((noMessageOrNoEdit || editingLastEvent || consecutiveEdit) &&
|
||||||
importantOrRoomLoaded) {
|
importantOrRoomLoaded) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue