Skip to content

Commit b8b437d

Browse files
committed
chore: tsc fixes
1 parent ae2c870 commit b8b437d

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/collectionview/index-common.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export abstract class CollectionViewBase extends View implements CollectionViewD
173173
}
174174

175175
public abstract refresh();
176+
public abstract eachChildAsync(callback);
176177
public abstract refreshVisibleItems();
177178
public abstract isItemAtIndexVisible(index: number);
178179
public abstract scrollToIndex(index: number, animated: boolean);
@@ -396,7 +397,6 @@ export abstract class CollectionViewBase extends View implements CollectionViewD
396397
private _itemTemplateSelectorBindable;
397398
_itemTemplateSelector: Function;
398399
onItemTemplateSelectorChanged(oldValue, newValue) {
399-
const start = Date.now()
400400
if (typeof newValue === 'string') {
401401
if (!this._itemTemplateSelectorBindable) {
402402
this._itemTemplateSelectorBindable = new ProxyViewContainer();
@@ -421,7 +421,6 @@ export abstract class CollectionViewBase extends View implements CollectionViewD
421421

422422
@profile
423423
onItemIdGeneratorChanged(oldValue, newValue) {
424-
const start = Date.now()
425424
if (typeof newValue === 'string') {
426425
if (!this._itemIdGeneratorBindable) {
427426
this._itemIdGeneratorBindable = new ProxyViewContainer();
@@ -459,7 +458,6 @@ export abstract class CollectionViewBase extends View implements CollectionViewD
459458

460459
@profile
461460
onItemTemplatesChanged(oldValue, newValue) {
462-
const start = Date.now()
463461
this._itemTemplatesInternal = new Map();
464462
if (newValue) {
465463
newValue.forEach((t) => {
@@ -487,7 +485,6 @@ export abstract class CollectionViewBase extends View implements CollectionViewD
487485
}
488486
@profile
489487
onItemsChanged(oldValue, newValue) {
490-
const start = Date.now()
491488
const getItem = newValue && (newValue as ItemsSource).getItem;
492489
this.isItemsSourceIn = typeof getItem === 'function';
493490
// we override the method to prevent the test on every getItem
@@ -503,7 +500,6 @@ export abstract class CollectionViewBase extends View implements CollectionViewD
503500
}
504501
spanSize: (item, index: number) => number;
505502
onSpanSizeChanged = (oldValue, newValue) => {
506-
const start = Date.now()
507503
this.spanSize = newValue;
508504
this.refresh();
509505
};

src/collectionview/index.ios.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ export class CollectionView extends CollectionViewBase {
187187
const view = children[index];
188188
if (view.parent instanceof CollectionView) {
189189
await callback(view);
190-
}
191-
else {
190+
} else {
192191
// in some cases (like item is unloaded from another place (like angular) view.parent becomes undefined)
193192
if (view.parent) {
194193
await callback(view.parent);
@@ -837,8 +836,8 @@ export class CollectionView extends CollectionViewBase {
837836
const heightMeasureSpec = height
838837
? Utils.layout.makeMeasureSpec(height, Utils.layout.EXACTLY)
839838
: horizontal
840-
? Utils.layout.makeMeasureSpec(this._innerHeight, Utils.layout.EXACTLY)
841-
: infinity;
839+
? Utils.layout.makeMeasureSpec(this._innerHeight, Utils.layout.EXACTLY)
840+
: infinity;
842841
if (Trace.isEnabled()) {
843842
CLog(CLogTypes.log, 'measureCell', position, width, height, this._innerWidth, this._innerHeight, widthMeasureSpec, heightMeasureSpec);
844843
}

0 commit comments

Comments
 (0)