Skip to content

Commit e45c982

Browse files
committed
fixActivity isDestroyed
1 parent 4190fe6 commit e45c982

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

android/src/main/java/cn/jiguang/imui/messagelist/ReactMsgListManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import android.content.Intent;
1010
import android.content.IntentFilter;
1111
import android.graphics.Color;
12+
import android.os.Build;
1213
import android.util.Log;
1314
import android.view.MotionEvent;
1415
import android.view.View;
@@ -125,6 +126,11 @@ public void loadAvatarImage(ImageView avatarImageView, String string) {
125126
if (reactContext == null || reactContext.getCurrentActivity() == null || string == null) {
126127
return;
127128
}
129+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
130+
if(reactContext.getCurrentActivity().isDestroyed()){
131+
return;
132+
}
133+
}
128134
if (string.startsWith("http://") || string.startsWith("https://")) {
129135
Glide.with(reactContext)
130136
.load(string)

0 commit comments

Comments
 (0)