@nativescript-community/ui-collectionview 6.0.5 → 6.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [6.0.7](https://github.com/nativescript-community/ui-collectionview/compare/v6.0.5...v6.0.7) (2025-09-30)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
* **ios:** edge case crash on collection view refresh ([be26e36](https://github.com/nativescript-community/ui-collectionview/commit/be26e3640cdaf6aaa3a56933e1abeadf19a44231))
|
11
|
+
|
6
12
|
## [6.0.5](https://github.com/nativescript-community/ui-collectionview/compare/v6.0.4...v6.0.5) (2025-09-08)
|
7
13
|
|
8
14
|
**Note:** Version bump only for package @nativescript-community/ui-collectionview
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-collectionview",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.7",
|
4
4
|
"description": "Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.",
|
5
5
|
"main": "./index",
|
6
6
|
"sideEffects": false,
|
@@ -60,5 +60,5 @@
|
|
60
60
|
"dependencies": {
|
61
61
|
"@nativescript-community/arraybuffers": "^1.1.5"
|
62
62
|
},
|
63
|
-
"gitHead": "
|
63
|
+
"gitHead": "d2e7ccac0e42db08dfca21f91691e5766aeb77d5"
|
64
64
|
}
|
@@ -18,19 +18,21 @@
|
|
18
18
|
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
19
19
|
{
|
20
20
|
NSInteger index = indexPath.row;
|
21
|
-
|
22
|
-
|
21
|
+
NSInteger count = [self.cachedSizes count];
|
22
|
+
if (index < count) {
|
23
|
+
NSValue* value = [self.cachedSizes objectAtIndex:index];
|
23
24
|
if (value != nil && !CGSizeEqualToSize([value CGSizeValue], CGSizeZero)) {
|
24
25
|
return [value CGSizeValue];
|
25
26
|
}
|
26
|
-
|
27
|
+
}
|
28
|
+
CGSize size = [self collectionView:collectionView layout:collectionViewLayout computedSizeForItemAtIndexPath:indexPath];
|
29
|
+
count = [self.cachedSizes count];
|
30
|
+
if (index < count) {
|
27
31
|
[self.cachedSizes replaceObjectAtIndex:indexPath.row withObject:[NSValue valueWithCGSize:size]];
|
28
|
-
return size;
|
29
32
|
} else {
|
30
|
-
CGSize size = [self collectionView:collectionView layout:collectionViewLayout computedSizeForItemAtIndexPath:indexPath];
|
31
33
|
[self.cachedSizes addObject:[NSValue valueWithCGSize:size]];
|
32
|
-
return size;
|
33
34
|
}
|
35
|
+
return size;
|
34
36
|
}
|
35
37
|
|
36
38
|
@end
|