mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Improve update handling more
This commit is contained in:
@@ -498,18 +498,21 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
|||||||
- (void)insertSections:(NSIndexSet *)sections
|
- (void)insertSections:(NSIndexSet *)sections
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
|
if (sections.count == 0) { return; }
|
||||||
[_dataController insertSections:sections withAnimationOptions:kASCollectionViewAnimationNone];
|
[_dataController insertSections:sections withAnimationOptions:kASCollectionViewAnimationNone];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)deleteSections:(NSIndexSet *)sections
|
- (void)deleteSections:(NSIndexSet *)sections
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
|
if (sections.count == 0) { return; }
|
||||||
[_dataController deleteSections:sections withAnimationOptions:kASCollectionViewAnimationNone];
|
[_dataController deleteSections:sections withAnimationOptions:kASCollectionViewAnimationNone];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)reloadSections:(NSIndexSet *)sections
|
- (void)reloadSections:(NSIndexSet *)sections
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
|
if (sections.count == 0) { return; }
|
||||||
[_dataController reloadSections:sections withAnimationOptions:kASCollectionViewAnimationNone];
|
[_dataController reloadSections:sections withAnimationOptions:kASCollectionViewAnimationNone];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,18 +525,21 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
|||||||
- (void)insertItemsAtIndexPaths:(NSArray *)indexPaths
|
- (void)insertItemsAtIndexPaths:(NSArray *)indexPaths
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
|
if (indexPaths.count == 0) { return; }
|
||||||
[_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone];
|
[_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths
|
- (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
|
if (indexPaths.count == 0) { return; }
|
||||||
[_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone];
|
[_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths
|
- (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
|
if (indexPaths.count == 0) { return; }
|
||||||
[_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone];
|
[_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user