Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLipan committed Nov 29, 2018
2 parents 59137cc + 55f57a6 commit 5b3b093
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
16 changes: 10 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
compileSdkVersion 23
buildToolsVersion "25.0.2"
compileSdkVersion safeExtGet('compileSdkVersion', 27)
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.2')

defaultConfig {
minSdkVersion 16
targetSdkVersion 22
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 27)
versionCode 1
versionName "1.0"
}
Expand All @@ -31,6 +35,6 @@ repositories {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.facebook.react:react-native:+"
api fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.facebook.react:react-native:+'
}
11 changes: 9 additions & 2 deletions android/src/io/jchat/android/JMessageModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public class JMessageModule extends ReactContextBaseJavaModule {

private Context mContext;
private JMessageUtils mJMessageUtils;
private HashMap<String, GroupApprovalEvent> groupApprovalEventHashMap;
private static HashMap<String, GroupApprovalEvent> groupApprovalEventHashMap;

public JMessageModule(ReactApplicationContext reactContext, boolean shutdownToast) {
super(reactContext);
mJMessageUtils = new JMessageUtils(reactContext, shutdownToast);
mContext = reactContext;
groupApprovalEventHashMap = new HashMap<>();

}

@Override
Expand All @@ -124,6 +124,13 @@ public boolean canOverrideExistingModule() {
return true;
}

@Override
public void initialize() {
super.initialize();
if(groupApprovalEventHashMap == null)
groupApprovalEventHashMap = new HashMap<>();
}

@ReactMethod
public void setup(ReadableMap map) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import com.facebook.react.ReactApplication;
import com.rnfs.RNFSPackage;

import cn.jiguang.imui.messagelist.BuildConfig;
import io.jchat.android.JMessageReactPackage;

import cn.jiguang.imui.messagelist.ReactIMUIPackage;
Expand Down
2 changes: 1 addition & 1 deletion example/app/routes/Chat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export default class Chat extends Component {
eventMsg.msgId = message.msgId
eventMsg.msgType = "event"
eventMsg.text = "撤回的消息"
AuroraIController.updateMessage(message)
AuroraIController.updateMessage(eventMsg);
}, (error) => {

})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jmessage-react-plugin",
"version": "2.4.8",
"version": "2.5.1",
"description": "a jmessage plugin for react native application",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 5b3b093

Please sign in to comment.