From 97b2543815309027d3abf8900dd6f40b99bcb700 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Tue, 11 Sep 2018 15:11:48 +0800 Subject: [PATCH] Update RN chatinput --- .../viewmanager/ReactChatInputManager.java | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java b/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java index 0ed4b165..d3074f25 100644 --- a/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java +++ b/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java @@ -65,7 +65,6 @@ import cn.jiguang.imui.messagelist.event.OnTouchMsgListEvent; import cn.jiguang.imui.messagelist.event.ScrollEvent; import cn.jiguang.imui.messagelist.event.StopPlayVoiceEvent; -import pub.devrel.easypermissions.AfterPermissionGranted; import pub.devrel.easypermissions.AppSettingsDialog; import pub.devrel.easypermissions.EasyPermissions; @@ -406,7 +405,7 @@ public void run() { @Override public void onTakePictureCompleted(String photoPath) { - if(mLastPhotoPath.equals(photoPath)){ + if (mLastPhotoPath.equals(photoPath)) { return; } mLastPhotoPath = photoPath; @@ -684,10 +683,10 @@ public void showSelectAlbumBtn(ChatInputView chatInputView, boolean flag) { @ReactProp(name = "showRecordVideoBtn") public void showRecordVideoBtn(ChatInputView chatInputView, boolean flag) { - if(flag){ + if (flag) { chatInputView.getRecordVideoBtn().setVisibility(View.VISIBLE); chatInputView.getRecordVideoBtn().setTag("VISIBLE"); - }else{ + } else { chatInputView.getRecordVideoBtn().setVisibility(View.GONE); chatInputView.getRecordVideoBtn().setTag("GONE"); } @@ -746,39 +745,40 @@ public void hidePhotoButton(ChatInputView chatInputView, boolean hide) { @ReactProp(name = "customLayoutItems") public void setCustomItems(ChatInputView chatInputView, ReadableMap map) { - ReadableArray left = map.hasKey("left")?map.getArray("left"):null; - ReadableArray right = map.hasKey("right")?map.getArray("right"):null; - ReadableArray bottom = map.hasKey("bottom")?map.getArray("bottom"):null; - String[] bottomTags = new String[0]; - if(bottom!=null){ - bottomTags = new String[bottom.size()]; - for(int i =0;i