зеркало из https://github.com/nextcloud/talk-ios.git
Don't reload the complete cell if a video stream is added
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Родитель
66ad8d88e3
Коммит
fb879a791e
|
@ -1418,12 +1418,20 @@ typedef NS_ENUM(NSInteger, CallState) {
|
|||
if ([remotePeer.roomType isEqualToString:kRoomTypeVideo]) {
|
||||
[self->_videoRenderersDict setObject:renderView forKey:remotePeer.peerId];
|
||||
NSIndexPath *indexPath = [self indexPathForPeerId:remotePeer.peerId];
|
||||
|
||||
if (!indexPath) {
|
||||
// This is a new peer, add it to the collection view
|
||||
|
||||
[self->_peersInCall addObject:remotePeer];
|
||||
NSIndexPath *insertionIndexPath = [NSIndexPath indexPathForRow:self->_peersInCall.count - 1 inSection:0];
|
||||
[self.collectionView insertItemsAtIndexPaths:@[insertionIndexPath]];
|
||||
} else {
|
||||
[self.collectionView reloadItemsAtIndexPaths:@[indexPath]];
|
||||
// This peer already exists in the collection view, so we can just update its cell
|
||||
|
||||
[self updatePeer:remotePeer block:^(CallParticipantViewCell *cell) {
|
||||
[cell setVideoView:renderView];
|
||||
[cell setVideoDisabled:!self->_isAudioOnly];
|
||||
}];
|
||||
}
|
||||
} else if ([remotePeer.roomType isEqualToString:kRoomTypeScreen]) {
|
||||
[self->_screenRenderersDict setObject:renderView forKey:remotePeer.peerId];
|
||||
|
|
Загрузка…
Ссылка в новой задаче