mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Add first-pass view model support to collection node. #trivial (#356)
* Add first-pass view model support for collection node. Much more to come! * Address issues * Update the gorram license header * Dear lord
This commit is contained in:
@@ -590,6 +590,12 @@
|
||||
return [self.dataController.pendingMap elementForItemAtIndexPath:indexPath].node;
|
||||
}
|
||||
|
||||
- (id)viewModelForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[self reloadDataInitiallyIfNeeded];
|
||||
return [self.dataController.pendingMap elementForItemAtIndexPath:indexPath].viewModel;
|
||||
}
|
||||
|
||||
- (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode
|
||||
{
|
||||
return [self.dataController.pendingMap indexPathForElement:cellNode.collectionElement];
|
||||
|
||||
Reference in New Issue
Block a user