From 5dccd8950be9c903efe2aa25d7441fb6b3beaa18 Mon Sep 17 00:00:00 2001 From: Frank Gregor Date: Fri, 7 Feb 2020 19:33:10 +0100 Subject: [PATCH] fixes a bug that crashed the app when a remote push notification about channel updates arrives --- .../Channel Grid/CCNChannelGridViewController.m | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/App/Podlive/Channel Grid/CCNChannelGridViewController.m b/App/Podlive/Channel Grid/CCNChannelGridViewController.m index 5baf0d7..e1d3868 100644 --- a/App/Podlive/Channel Grid/CCNChannelGridViewController.m +++ b/App/Podlive/Channel Grid/CCNChannelGridViewController.m @@ -266,15 +266,8 @@ - (void)handlePushNotificationChannelStateUpdated:(NSNotification *)note { [ctx invalidateSupplementaryElementsOfKind:CCNCollectionElementKindItemDetail atIndexPaths:indexPaths]; [layout invalidateLayoutWithContext:ctx]; - [self.collectionView.animator performBatchUpdates:^{ - @strongify(self); - [self.collectionView moveItemAtIndexPath:channelIndexPathOld toIndexPath:channelIndexPathNew]; - [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]]; - - } completionHandler:^(BOOL finished) { - @strongify(self); - [self updateHeaderViews]; - }]; + [self.collectionView.animator moveItemAtIndexPath:channelIndexPathOld toIndexPath:channelIndexPathNew]; + [self updateHeaderViews]; }; dispatch_async(dispatch_get_main_queue(), ^{