mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-03 19:30:09 +00:00
Rename -[ASCellNode viewModel] to -[ASCellNode nodeViewModel] to avoid collisions (#499)
* Rename -[ASCellNode viewModel] -> -[ASCellNode nodeViewModel] to avoid breaking existing code * Update test * Update the changelog
This commit is contained in:
parent
49b1f82c5a
commit
d2adb8f126
@ -13,6 +13,7 @@
|
|||||||
- Add -[ASDisplayNode detailedLayoutDescription] property to aid debugging. [Adlai Holler](https://github.com/Adlai-Holler) [#476](https://github.com/TextureGroup/Texture/pull/476)
|
- Add -[ASDisplayNode detailedLayoutDescription] property to aid debugging. [Adlai Holler](https://github.com/Adlai-Holler) [#476](https://github.com/TextureGroup/Texture/pull/476)
|
||||||
- Fix an issue that causes calculatedLayoutDidChange being called needlessly. [Huy Nguyen](https://github.com/nguyenhuy) [#490](https://github.com/TextureGroup/Texture/pull/490)
|
- Fix an issue that causes calculatedLayoutDidChange being called needlessly. [Huy Nguyen](https://github.com/nguyenhuy) [#490](https://github.com/TextureGroup/Texture/pull/490)
|
||||||
- Negate iOS 11 automatic estimated table row heights. [Christian Selig](https://github.com/christianselig) [#485](https://github.com/TextureGroup/Texture/pull/485)
|
- Negate iOS 11 automatic estimated table row heights. [Christian Selig](https://github.com/christianselig) [#485](https://github.com/TextureGroup/Texture/pull/485)
|
||||||
|
- Rename ASCellNode.viewModel to ASCellNode.nodeViewModel to reduce collisions with subclass properties implemented by clients. [Adlai Holler](https://github.com/Adlai-Holler) [#499](https://github.com/TextureGroup/Texture/pull/499)
|
||||||
|
|
||||||
##2.3.5
|
##2.3.5
|
||||||
- Fix an issue where inserting/deleting sections could lead to inconsistent supplementary element behavior. [Adlai Holler](https://github.com/Adlai-Holler)
|
- Fix an issue where inserting/deleting sections could lead to inconsistent supplementary element behavior. [Adlai Holler](https://github.com/Adlai-Holler)
|
||||||
|
@ -123,7 +123,7 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
|
|||||||
*
|
*
|
||||||
* This property may be set off the main thread, but this method will never be invoked concurrently on the
|
* This property may be set off the main thread, but this method will never be invoked concurrently on the
|
||||||
*/
|
*/
|
||||||
@property (atomic, nullable) id viewModel;
|
@property (atomic, nullable) id nodeViewModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asks the node whether it can be updated to the given view model.
|
* Asks the node whether it can be updated to the given view model.
|
||||||
|
@ -172,7 +172,7 @@
|
|||||||
|
|
||||||
- (BOOL)canUpdateToViewModel:(id)viewModel
|
- (BOOL)canUpdateToViewModel:(id)viewModel
|
||||||
{
|
{
|
||||||
return [self.viewModel class] == [viewModel class];
|
return [self.nodeViewModel class] == [viewModel class];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSIndexPath *)indexPath
|
- (NSIndexPath *)indexPath
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
node.owningNode = _owningNode;
|
node.owningNode = _owningNode;
|
||||||
node.collectionElement = self;
|
node.collectionElement = self;
|
||||||
ASTraitCollectionPropagateDown(node, _traitCollection);
|
ASTraitCollectionPropagateDown(node, _traitCollection);
|
||||||
node.viewModel = _viewModel;
|
node.nodeViewModel = _viewModel;
|
||||||
_node = node;
|
_node = node;
|
||||||
}
|
}
|
||||||
return _node;
|
return _node;
|
||||||
|
@ -254,7 +254,7 @@
|
|||||||
id viewModel = viewModels[indexPath.item];
|
id viewModel = viewModels[indexPath.item];
|
||||||
XCTAssertEqualObjects(viewModel, [collectionNode viewModelForItemAtIndexPath:indexPath]);
|
XCTAssertEqualObjects(viewModel, [collectionNode viewModelForItemAtIndexPath:indexPath]);
|
||||||
ASCellNode *node = [collectionNode nodeForItemAtIndexPath:indexPath];
|
ASCellNode *node = [collectionNode nodeForItemAtIndexPath:indexPath];
|
||||||
XCTAssertEqualObjects(node.viewModel, viewModel);
|
XCTAssertEqualObjects(node.nodeViewModel, viewModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user