File tree Expand file tree Collapse file tree 5 files changed +23
-10
lines changed
android/app/src/main/java/com/sample/application Expand file tree Collapse file tree 5 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
22
3+ def safeExtGet (prop , fallback ) {
4+ rootProject. ext. has(prop) ? rootProject. ext. get(prop) : fallback
5+ }
6+
37android {
4- compileSdkVersion 23
5- buildToolsVersion " 25 .0.2"
8+ compileSdkVersion safeExtGet( ' compileSdkVersion ' , 27 )
9+ buildToolsVersion safeExtGet( ' buildToolsVersion ' , ' 26 .0.2' )
610
711 defaultConfig {
8- minSdkVersion 16
9- targetSdkVersion 22
12+ minSdkVersion safeExtGet( ' minSdkVersion ' , 16 )
13+ targetSdkVersion safeExtGet( ' targetSdkVersion ' , 27 )
1014 versionCode 1
1115 versionName " 1.0"
1216 }
@@ -31,6 +35,6 @@ repositories {
3135}
3236
3337dependencies {
34- compile fileTree(dir : ' libs ' , include : [' *.jar' ])
35- compile " com.facebook.react:react-native:+"
38+ api fileTree(include : [' *.jar' ], dir : ' libs ' )
39+ implementation ' com.facebook.react:react-native:+'
3640}
Original file line number Diff line number Diff line change @@ -105,13 +105,13 @@ public class JMessageModule extends ReactContextBaseJavaModule {
105105
106106 private Context mContext ;
107107 private JMessageUtils mJMessageUtils ;
108- private HashMap <String , GroupApprovalEvent > groupApprovalEventHashMap ;
108+ private static HashMap <String , GroupApprovalEvent > groupApprovalEventHashMap ;
109109
110110 public JMessageModule (ReactApplicationContext reactContext , boolean shutdownToast ) {
111111 super (reactContext );
112112 mJMessageUtils = new JMessageUtils (reactContext , shutdownToast );
113113 mContext = reactContext ;
114- groupApprovalEventHashMap = new HashMap <>();
114+
115115 }
116116
117117 @ Override
@@ -124,6 +124,13 @@ public boolean canOverrideExistingModule() {
124124 return true ;
125125 }
126126
127+ @ Override
128+ public void initialize () {
129+ super .initialize ();
130+ if (groupApprovalEventHashMap == null )
131+ groupApprovalEventHashMap = new HashMap <>();
132+ }
133+
127134 @ ReactMethod
128135 public void setup (ReadableMap map ) {
129136 try {
Original file line number Diff line number Diff line change 55
66import com .facebook .react .ReactApplication ;
77import com .rnfs .RNFSPackage ;
8+
9+ import cn .jiguang .imui .messagelist .BuildConfig ;
810import io .jchat .android .JMessageReactPackage ;
911
1012import cn .jiguang .imui .messagelist .ReactIMUIPackage ;
Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ export default class Chat extends Component {
325325 eventMsg . msgId = message . msgId
326326 eventMsg . msgType = "event"
327327 eventMsg . text = "撤回的消息"
328- AuroraIController . updateMessage ( message )
328+ AuroraIController . updateMessage ( eventMsg ) ;
329329 } , ( error ) => {
330330
331331 } )
Original file line number Diff line number Diff line change 11{
22 "name" : " jmessage-react-plugin" ,
3- "version" : " 2.4.8 " ,
3+ "version" : " 2.5.1 " ,
44 "description" : " a jmessage plugin for react native application" ,
55 "main" : " index.js" ,
66 "repository" : {
You can’t perform that action at this time.
0 commit comments