Skip to content

Commit

Permalink
Downgrade IGListKit assertion
Browse files Browse the repository at this point in the history
Summary: This assertion has been firing for at least the [last 3 months](https://fburl.com/scuba/errorreporting_instagram_ios_assertions/vfxo4h2g) and we have shipped the app anyways so it is definitely not launch blocking.

Reviewed By: fabiomassimo

Differential Revision: D49281317

fbshipit-source-id: d525f88fe676e813b8413a2e0f21b6b12728b359
  • Loading branch information
Krys Jurgowski authored and facebook-github-bot committed Sep 15, 2023
1 parent ffd51e6 commit 050cd8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Source/IGListDiffKit/IGListAssert.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#define IGWarn( condition, ... ) NSCAssert( (condition) , ##__VA_ARGS__)
#endif // IGWarn

#ifndef IGWarnAssert
#define IGWarnAssert(frmt, ... ) IGAssert( (NO) , ##__VA_ARGS__)
#endif // IGWarnAssert

#ifndef IGFailAssert
#define IGFailAssert( ... ) IGAssert( (NO) , ##__VA_ARGS__)
#endif // IGFailAssert
Expand Down
2 changes: 1 addition & 1 deletion Source/IGListKit/Internal/IGListBatchUpdateTransaction.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ - (void)_didDiff:(IGListIndexSetResult *)diffResult onBackground:(BOOL)onBackgro
[self _reload];
} else if (self.sectionData && [self.collectionView numberOfSections] != self.sectionData.fromObjects.count) {
// If data is nil, there are no section updates.
IGFailAssert(@"The UICollectionView's section count (%li) didn't match the IGListAdapter's count (%li), so we can't performBatchUpdates. Falling back to reloadData.",
IGWarnAssert(@"The UICollectionView's section count (%li) didn't match the IGListAdapter's count (%li), so we can't performBatchUpdates. Falling back to reloadData.",
(long)[self.collectionView numberOfSections],
(long)self.sectionData.fromObjects.count);
[self _reload];
Expand Down

0 comments on commit 050cd8e

Please # to comment.