You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/01/08 07:13:36 UTC
[incubator-weex] branch master updated: [WEEX][Android] When View
Not InstanceOf WXGestureObservable, mGestureType is Null,
remove event has none affect, (#1968)
This is an automated email from the ASF dual-hosted git repository.
kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new 34598da [WEEX][Android] When View Not InstanceOf WXGestureObservable, mGestureType is Null, remove event has none affect, (#1968)
34598da is described below
commit 34598dab0507a5668ad25862bfa887faa3bf1860
Author: codefurture <gu...@163.com>
AuthorDate: Tue Jan 8 15:13:30 2019 +0800
[WEEX][Android] When View Not InstanceOf WXGestureObservable, mGestureType is Null, remove event has none affect, (#1968)
---
.../java/com/taobao/weex/ui/component/WXComponent.java | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index b926b95..93635f6 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -1501,16 +1501,19 @@ public abstract class WXComponent<T extends View> extends WXBasicComponent imple
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);
}