Skip to content

Commit e0237d4

Browse files
Merge pull request #6146 from vector-im/maximee/PSF-986_lls_fix_live_banner_visibility
6111: add refresh of live banner visibility when receive beacon from …
2 parents ce9d502 + 1e16c40 commit e0237d4

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Riot/Modules/Room/DataSources/RoomDataSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
@property (nonatomic, nullable) NSString *highlightedEventId;
6868

6969
/// Is current user sharing is location in the room
70-
@property(nonatomic, readonly) BOOL isCurrentUserSharingIsLocation;
70+
@property(nonatomic, readonly) BOOL isCurrentUserSharingActiveLocation;
7171

7272
/**
7373
Check if there is an active jitsi widget in the room and return it.

Riot/Modules/Room/DataSources/RoomDataSource.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ @interface RoomDataSource() <RoomReactionsViewModelDelegate, URLPreviewViewDeleg
5959

6060
@property (nonatomic) NSInteger typingCellIndex;
6161

62-
@property(nonatomic, readwrite) BOOL isCurrentUserSharingIsLocation;
62+
@property(nonatomic, readwrite) BOOL isCurrentUserSharingActiveLocation;
6363

6464
@end
6565

@@ -767,6 +767,7 @@ - (void)registerBeaconInfoSummaryListner
767767
MXWeakify(self);
768768
self.beaconInfoSummaryListener = [self.mxSession.aggregations.beaconAggregations listenToBeaconInfoSummaryUpdateInRoomWithId:self.roomId handler:^(id<MXBeaconInfoSummaryProtocol> beaconInfoSummary) {
769769
MXStrongifyAndReturnIfNil(self);
770+
[self updateCurrentUserLocationSharingStatus];
770771
[self refreshFirstCellWithBeaconInfoSummary:beaconInfoSummary];
771772
}];
772773
}
@@ -1203,11 +1204,11 @@ - (void)updateCurrentUserLocationSharingStatus
12031204
return;
12041205
}
12051206

1206-
BOOL isUserSharingIsLocation = [locationService isCurrentUserSharingIsLocationInRoomWithId:self.roomId];
1207+
BOOL isUserSharingActiveLocation = [locationService isCurrentUserSharingActiveLocationInRoomWithId:self.roomId];
12071208

1208-
if (isUserSharingIsLocation != self.isCurrentUserSharingIsLocation)
1209+
if (isUserSharingActiveLocation != self.isCurrentUserSharingActiveLocation)
12091210
{
1210-
self.isCurrentUserSharingIsLocation = [locationService isCurrentUserSharingIsLocationInRoomWithId:self.roomId];
1211+
self.isCurrentUserSharingActiveLocation = [locationService isCurrentUserSharingActiveLocationInRoomWithId:self.roomId];
12111212

12121213
dispatch_async(dispatch_get_main_queue(), ^{
12131214
[self.roomDataSourceDelegate roomDataSourceDidUpdateCurrentUserSharingLocationStatus:self];

Riot/Modules/Room/RoomViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ - (void)setMissedDiscussionsBadgeHidden:(BOOL)missedDiscussionsBadgeHidden{
15311531

15321532
- (BOOL)shouldShowLiveLocationSharingBannerView
15331533
{
1534-
return self.customizedRoomDataSource.isCurrentUserSharingIsLocation;
1534+
return self.customizedRoomDataSource.isCurrentUserSharingActiveLocation;
15351535
}
15361536

15371537
#pragma mark - Internals

changelog.d/6111.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Location sharing: handle correctly visibility of the live banner in room

0 commit comments

Comments
 (0)