mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge pull request #6190 from vector-im/steve/6189_roomdatasource_crash
RoomDataSource: Improve live location sharing status verification
This commit is contained in:
commit
2e0e90eed1
1 changed files with 5 additions and 3 deletions
|
@ -1199,16 +1199,18 @@ const CGFloat kTypingCellHeight = 24;
|
|||
{
|
||||
MXLocationService *locationService = self.mxSession.locationService;
|
||||
|
||||
if (!locationService || !self.roomId)
|
||||
NSString *roomId = self.roomId;
|
||||
|
||||
if (!locationService || !roomId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL isUserSharingActiveLocation = [locationService isCurrentUserSharingActiveLocationInRoomWithId:self.roomId];
|
||||
BOOL isUserSharingActiveLocation = [locationService isCurrentUserSharingActiveLocationInRoomWithId:roomId];
|
||||
|
||||
if (isUserSharingActiveLocation != self.isCurrentUserSharingActiveLocation)
|
||||
{
|
||||
self.isCurrentUserSharingActiveLocation = [locationService isCurrentUserSharingActiveLocationInRoomWithId:self.roomId];
|
||||
self.isCurrentUserSharingActiveLocation = isUserSharingActiveLocation;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.roomDataSourceDelegate roomDataSourceDidUpdateCurrentUserSharingLocationStatus:self];
|
||||
|
|
Loading…
Reference in a new issue