Compare commits

...

5 Commits

Author SHA1 Message Date
Grigory 3adb53a269 Merge pull request #1 from TouchInstinct/bugfix/firstLoading
firstLoading fixed
2016-12-16 19:49:56 +03:00
Grigory Ulanov 71c792461e firstLoading fixed 2016-12-16 19:40:16 +03:00
Grigory Ulanov 62ac08bb6e Merge branch 'Progress_animation_fix' 2016-11-22 12:24:36 +03:00
Grigory Ulanov 67feae7fc0 Merge branch 'BatchUpdates_at_pagination' 2016-11-22 12:24:32 +03:00
Grigory Ulanov 75887d2ebc progress animation fixed 2016-11-22 12:24:13 +03:00
2 changed files with 3 additions and 2 deletions

View File

@ -140,7 +140,7 @@ extension BaseChatViewController: ChatDataSourceDelegateProtocol {
let animateBatchUpdates: Bool
do { // Recover from too fast updates...
let visibleCellsAreValid = self.visibleCellsAreValid(changes: changes)
let wantsReloadData = ![UpdateType.normal, UpdateType.pagination].contains(updateType)
let wantsReloadData = ![UpdateType.normal, UpdateType.pagination, UpdateType.firstLoad].contains(updateType)
let hasUnfinishedBatchUpdates = self.unfinishedBatchUpdatesCount > 0 // This can only happen when enabling self.updatesConfig.fastUpdates
// a) It's unsafe to perform reloadData while there's a performBatchUpdates animating: https://github.com/diegosanchezr/UICollectionViewStressing/tree/master/GhostCells
@ -159,7 +159,7 @@ extension BaseChatViewController: ChatDataSourceDelegateProtocol {
// ... if they are still invalid the only thing we can do is a reloadData
let mustDoReloadData = !visibleCellsAreValid // Only way to recover from this inconsistent state
usesBatchUpdates = !wantsReloadData && !mustDoReloadData
animateBatchUpdates = updateType != .pagination
animateBatchUpdates = ![UpdateType.pagination, UpdateType.firstLoad].contains(updateType)
}
let scrollAction: ScrollAction

View File

@ -101,6 +101,7 @@
rotationAnimation.duration = 1;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = HUGE_VALF;
rotationAnimation.removedOnCompletion = NO;
[_bgLayer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
}