Skip to content

Commit 9d03c28

Browse files
author
vakrilov
committed
Clean up unused variables
1 parent eb27a01 commit 9d03c28

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

nativescript-angular/directives/list-view-comp.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,17 @@ import {
77
TemplateRef,
88
ContentChild,
99
EmbeddedViewRef,
10-
HostListener,
1110
IterableDiffers,
1211
IterableDiffer,
1312
ChangeDetectorRef,
1413
EventEmitter,
1514
ViewChild,
1615
Output,
17-
NgZone,
1816
ChangeDetectionStrategy } from '@angular/core';
1917
import {isBlank} from '@angular/core/src/facade/lang';
2018
import {isListLikeIterable} from '@angular/core/src/facade/collection';
21-
import {Observable as RxObservable} from 'rxjs'
2219
import {ListView} from 'ui/list-view';
2320
import {View} from 'ui/core/view';
24-
import {NgView} from '../view-util';
2521
import {ObservableArray} from 'data/observable-array';
2622
import {LayoutBase} from 'ui/layouts/layout-base';
2723
import {listViewLog} from "../trace";
@@ -79,14 +75,12 @@ export class ListViewComponent implements DoCheck, OnDestroy {
7975
this._differ = this._iterableDiffers.find(this._items).create(this._cdr, (index, item) => { return item; });
8076
}
8177

82-
// this._cdr.detach();
8378
this.listView.items = this._items;
8479
}
8580

8681
constructor(private _elementRef: ElementRef,
8782
private _iterableDiffers: IterableDiffers,
88-
private _cdr: ChangeDetectorRef,
89-
private _zone: NgZone) {
83+
private _cdr: ChangeDetectorRef) {
9084
this.listView = _elementRef.nativeElement;
9185

9286
this.listView.on("itemLoading", this.onItemLoading, this);
@@ -140,15 +134,13 @@ export class ListViewComponent implements DoCheck, OnDestroy {
140134
}
141135

142136
private detectChangesOnChild(viewRef: EmbeddedViewRef<ListItemContext>, index: number) {
143-
// Manually detect changes in view ref
144-
//
137+
// Manually detect changes in child view ref
138+
// TODO: Is there a better way of getting viewRef's change detector
145139
const childChangeDetector = <ChangeDetectorRef>(<any>viewRef);
146140

147141
listViewLog("Manually detect changes in child: " + index)
148-
// listViewLog("CangeDetectionState child before mark " + getChangeDetectorState((<any>viewRef)._view));
149142
childChangeDetector.markForCheck();
150143
childChangeDetector.detectChanges();
151-
// listViewLog("CangeDetectionState child after detect " + getChangeDetectorState((<any>viewRef)._view));
152144
}
153145

154146
ngDoCheck() {

0 commit comments

Comments
 (0)