mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
merged from element 1.8.13
This commit is contained in:
@@ -57,6 +57,8 @@ const CGFloat kTypingCellHeight = 24;
|
||||
|
||||
@property (nonatomic) NSInteger typingCellIndex;
|
||||
|
||||
@property(nonatomic, readwrite) BOOL isCurrentUserSharingIsLocation;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RoomDataSource
|
||||
@@ -132,6 +134,8 @@ const CGFloat kTypingCellHeight = 24;
|
||||
}
|
||||
|
||||
self.showTypingRow = YES;
|
||||
|
||||
[self updateCurrentUserLocationSharingStatus];
|
||||
}
|
||||
|
||||
- (id<RoomDataSourceDelegate>)roomDataSourceDelegate
|
||||
@@ -232,6 +236,11 @@ const CGFloat kTypingCellHeight = 24;
|
||||
|
||||
- (void)roomSummaryDidChange:(NSNotification*)notification
|
||||
{
|
||||
if (BuildSettings.liveLocationSharingEnabled)
|
||||
{
|
||||
[self updateCurrentUserLocationSharingStatus];
|
||||
}
|
||||
|
||||
if (!self.room.summary.isEncrypted)
|
||||
{
|
||||
return;
|
||||
@@ -1028,6 +1037,13 @@ const CGFloat kTypingCellHeight = 24;
|
||||
// no need to reload when paginating back
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL notify = YES;
|
||||
if (self.threadId)
|
||||
{
|
||||
// no need to notify the thread screen, it'll cause a flickering
|
||||
notify = NO;
|
||||
}
|
||||
NSUInteger count = 0;
|
||||
@synchronized (bubbles)
|
||||
{
|
||||
@@ -1035,7 +1051,7 @@ const CGFloat kTypingCellHeight = 24;
|
||||
}
|
||||
if (count > 0)
|
||||
{
|
||||
[self reload];
|
||||
[self reloadNotifying:notify];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1185,4 +1201,27 @@ const CGFloat kTypingCellHeight = 24;
|
||||
didTapThread:summaryView.thread];
|
||||
}
|
||||
|
||||
#pragma mark - Location sharing
|
||||
|
||||
- (void)updateCurrentUserLocationSharingStatus
|
||||
{
|
||||
MXLocationService *locationService = self.mxSession.locationService;
|
||||
|
||||
if (!locationService || !self.roomId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL isUserSharingIsLocation = [locationService isCurrentUserSharingIsLocationInRoomWithId:self.roomId];
|
||||
|
||||
if (isUserSharingIsLocation != self.isCurrentUserSharingIsLocation)
|
||||
{
|
||||
self.isCurrentUserSharingIsLocation = [locationService isCurrentUserSharingIsLocationInRoomWithId:self.roomId];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.roomDataSourceDelegate roomDataSourceDidUpdateCurrentUserSharingLocationStatus:self];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user