Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[WEEX][Android] When View Not InstanceOf WXGestureObservable, mGestur…
Browse files Browse the repository at this point in the history
…eType is Null, remove event has none affect, (#1968)
  • Loading branch information
gubaojian authored and YorkShen committed Jan 8, 2019
1 parent 5788431 commit 34598da
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1501,16 +1501,19 @@ public void removeEvent(String type) {
if (TextUtils.isEmpty(type)) {
return;
}
if (getEvents() == null || mAppendEvents == null || mGestureType == null) {
return;
}

if (type.equals(Constants.Event.LAYEROVERFLOW))
removeLayerOverFlowListener(getRef());

getEvents().remove(type);
mAppendEvents.remove(type);//only clean append events, not dom's events.
mGestureType.remove(type);
if(getEvents() != null){
getEvents().remove(type);
}
if(mAppendEvents != null) {
mAppendEvents.remove(type);//only clean append events, not dom's events.
}
if(mGestureType != null){
mGestureType.remove(type);
}
removeEventFromView(type);
}

Expand Down

0 comments on commit 34598da

Please sign in to comment.