mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
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 …
This commit is contained in:
commit
e0237d421b
4 changed files with 8 additions and 6 deletions
|
@ -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.
|
||||
|
|
|
@ -59,7 +59,7 @@ const CGFloat kTypingCellHeight = 24;
|
|||
|
||||
@property (nonatomic) NSInteger typingCellIndex;
|
||||
|
||||
@property(nonatomic, readwrite) BOOL isCurrentUserSharingIsLocation;
|
||||
@property(nonatomic, readwrite) BOOL isCurrentUserSharingActiveLocation;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -767,6 +767,7 @@ const CGFloat kTypingCellHeight = 24;
|
|||
MXWeakify(self);
|
||||
self.beaconInfoSummaryListener = [self.mxSession.aggregations.beaconAggregations listenToBeaconInfoSummaryUpdateInRoomWithId:self.roomId handler:^(id<MXBeaconInfoSummaryProtocol> beaconInfoSummary) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
[self updateCurrentUserLocationSharingStatus];
|
||||
[self refreshFirstCellWithBeaconInfoSummary:beaconInfoSummary];
|
||||
}];
|
||||
}
|
||||
|
@ -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];
|
||||
|
|
|
@ -1531,7 +1531,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
|||
|
||||
- (BOOL)shouldShowLiveLocationSharingBannerView
|
||||
{
|
||||
return self.customizedRoomDataSource.isCurrentUserSharingIsLocation;
|
||||
return self.customizedRoomDataSource.isCurrentUserSharingActiveLocation;
|
||||
}
|
||||
|
||||
#pragma mark - Internals
|
||||
|
|
1
changelog.d/6111.bugfix
Normal file
1
changelog.d/6111.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Location sharing: handle correctly visibility of the live banner in room
|
Loading…
Reference in a new issue