diff --git a/Riot/Modules/Room/DataSources/RoomDataSource.h b/Riot/Modules/Room/DataSources/RoomDataSource.h index a3f8017ec..0decb9e0e 100644 --- a/Riot/Modules/Room/DataSources/RoomDataSource.h +++ b/Riot/Modules/Room/DataSources/RoomDataSource.h @@ -67,7 +67,7 @@ @property (nonatomic, nullable) NSString *highlightedEventId; /// Is current user sharing is location in the room -@property(nonatomic, readonly) BOOL isCurrentUserSharingIsLocation; +@property(nonatomic, readonly) BOOL isCurrentUserSharingActiveLocation; /** Check if there is an active jitsi widget in the room and return it. diff --git a/Riot/Modules/Room/DataSources/RoomDataSource.m b/Riot/Modules/Room/DataSources/RoomDataSource.m index b075fd1b2..8ed978171 100644 --- a/Riot/Modules/Room/DataSources/RoomDataSource.m +++ b/Riot/Modules/Room/DataSources/RoomDataSource.m @@ -59,7 +59,7 @@ const CGFloat kTypingCellHeight = 24; @property (nonatomic) NSInteger typingCellIndex; -@property(nonatomic, readwrite) BOOL isCurrentUserSharingIsLocation; +@property(nonatomic, readwrite) BOOL isCurrentUserSharingActiveLocation; @end @@ -794,6 +794,7 @@ const CGFloat kTypingCellHeight = 24; if (cellIndex != NSNotFound) { + [self updateCurrentUserLocationSharingStatus]; roomBubbleCellData.beaconInfoSummary = beaconInfoSummary; [self refreshCells]; } @@ -1203,11 +1204,11 @@ const CGFloat kTypingCellHeight = 24; return; } - BOOL isUserSharingIsLocation = [locationService isCurrentUserSharingIsLocationInRoomWithId:self.roomId]; + BOOL isUserSharingActiveLocation = [locationService isCurrentUserSharingActiveLocationInRoomWithId:self.roomId]; - if (isUserSharingIsLocation != self.isCurrentUserSharingIsLocation) + if (isUserSharingActiveLocation != self.isCurrentUserSharingActiveLocation) { - self.isCurrentUserSharingIsLocation = [locationService isCurrentUserSharingIsLocationInRoomWithId:self.roomId]; + self.isCurrentUserSharingActiveLocation = [locationService isCurrentUserSharingActiveLocationInRoomWithId:self.roomId]; dispatch_async(dispatch_get_main_queue(), ^{ [self.roomDataSourceDelegate roomDataSourceDidUpdateCurrentUserSharingLocationStatus:self]; diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 4a6caca8c..756cc63c4 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -1524,7 +1524,7 @@ static CGSize kThreadListBarButtonItemImageSize; - (BOOL)shouldShowLiveLocationSharingBannerView { - return customizedRoomDataSource.isCurrentUserSharingIsLocation; + return customizedRoomDataSource.isCurrentUserSharingActiveLocation; } #pragma mark - Internals diff --git a/changelog.d/6111.bugfix b/changelog.d/6111.bugfix new file mode 100644 index 000000000..08bbea13d --- /dev/null +++ b/changelog.d/6111.bugfix @@ -0,0 +1 @@ +Location sharing: handle correctly visibility of the live banner in room