mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
Clean unused variables
This commit is contained in:
@ -124,7 +124,6 @@ export class Binding {
|
|||||||
updating = false;
|
updating = false;
|
||||||
source: WeakRef<Object>;
|
source: WeakRef<Object>;
|
||||||
target: WeakRef<Bindable>;
|
target: WeakRef<Bindable>;
|
||||||
weakEventId: number;
|
|
||||||
|
|
||||||
private sourceOptions: { instance: WeakRef<any>; property: any };
|
private sourceOptions: { instance: WeakRef<any>; property: any };
|
||||||
private targetOptions: { instance: WeakRef<any>; property: any };
|
private targetOptions: { instance: WeakRef<any>; property: any };
|
||||||
|
4
ui/core/weak-event-listener.d.ts
vendored
4
ui/core/weak-event-listener.d.ts
vendored
@ -2,7 +2,7 @@ declare module "ui/core/weak-event-listener" {
|
|||||||
import observable = require("data/observable");
|
import observable = require("data/observable");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and initialize WeakEventListener.
|
* Attaches a WeakEventListener.
|
||||||
* @param source Observable class which emits the event.
|
* @param source Observable class which emits the event.
|
||||||
* @param eventName The event name.
|
* @param eventName The event name.
|
||||||
* @param handler The function which should be called when event occurs.
|
* @param handler The function which should be called when event occurs.
|
||||||
@ -11,7 +11,7 @@ declare module "ui/core/weak-event-listener" {
|
|||||||
export function addWeakEventListener(source: observable.Observable, eventName: string, handler: (eventData: observable.EventData) => void, target: any) : void;
|
export function addWeakEventListener(source: observable.Observable, eventName: string, handler: (eventData: observable.EventData) => void, target: any) : void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes and clears all resources from WeakEventListener.
|
* Removes a WeakEventListener.
|
||||||
* @param source Observable class which emits the event.
|
* @param source Observable class which emits the event.
|
||||||
* @param eventName The event name.
|
* @param eventName The event name.
|
||||||
* @param handler The function which should be called when event occurs.
|
* @param handler The function which should be called when event occurs.
|
||||||
|
@ -69,8 +69,6 @@ export class ListView extends view.View implements definition.ListView {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
private _itemsChangedWeakListenerId: number;
|
|
||||||
|
|
||||||
get items(): any {
|
get items(): any {
|
||||||
return this._getValue(ListView.itemsProperty);
|
return this._getValue(ListView.itemsProperty);
|
||||||
}
|
}
|
||||||
@ -131,9 +129,8 @@ export class ListView extends view.View implements definition.ListView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public _onItemsPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
public _onItemsPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
||||||
if (data.oldValue instanceof observable.Observable && types.isDefined(this._itemsChangedWeakListenerId)) {
|
if (data.oldValue instanceof observable.Observable)) {
|
||||||
weakEvents.removeWeakEventListener(data.oldValue, observableArray.ObservableArray.changeEvent, this._onItemsChanged, this);
|
weakEvents.removeWeakEventListener(data.oldValue, observableArray.ObservableArray.changeEvent, this._onItemsChanged, this);
|
||||||
delete this._itemsChangedWeakListenerId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.newValue instanceof observable.Observable) {
|
if (data.newValue instanceof observable.Observable) {
|
||||||
|
Reference in New Issue
Block a user