mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Delete supplementary nodes when section is deleted
This commit is contained in:
@@ -103,6 +103,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)willDeleteSections:(NSIndexSet *)sections
|
- (void)willDeleteSections:(NSIndexSet *)sections
|
||||||
|
{
|
||||||
|
NSArray *elementKinds = [self.collectionDataSource supplementaryNodeKindsInDataController:self];
|
||||||
|
[elementKinds enumerateObjectsUsingBlock:^(NSString *kind, NSUInteger idx, BOOL *stop) {
|
||||||
|
NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet([self editingNodesOfKind:kind], sections);
|
||||||
|
|
||||||
|
[self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil];
|
||||||
|
[self deleteSectionsOfKind:kind atIndexSet:sections completion:nil];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)prepareForReloadSections:(NSIndexSet *)sections
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user