New async [MXRoom state:]: Fix issue using preloadRoomsData

This commit is contained in:
manuroe
2018-07-31 16:53:08 +02:00
parent e82311958a
commit 27e6a50ce0
@@ -339,7 +339,8 @@
// Make sure we can access synchronously to self.mxRoom and mxRoom data
// to avoid race conditions
MXWeakify(self);
[_mxRoom.mxSession preloadRoomsData:@[_mxRoom.roomId, mxRoom.roomId] onComplete:^{
[mxRoom.mxSession preloadRoomsData:_mxRoom ? @[_mxRoom.roomId, mxRoom.roomId] : @[mxRoom.roomId]
onComplete:^{
MXStrongifyAndReturnIfNil(self);
// Remove previous room registration (if any).