fix:保留首次进入跳转直播间功能,但在弹对话框前判断Activity是否销毁
This commit is contained in:
parent
12221c3ddc
commit
e8e1186498
@ -75,6 +75,11 @@ public class DialogUitl {
|
||||
}
|
||||
|
||||
public static void showSimpleTipDialog(Context context, String title, String content) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
||||
dialog.setContentView(R.layout.dialog_simple_tip);
|
||||
dialog.setCancelable(true);
|
||||
@ -105,6 +110,11 @@ public class DialogUitl {
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback callback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
@ -115,6 +125,11 @@ public class DialogUitl {
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
@ -125,6 +140,11 @@ public class DialogUitl {
|
||||
}
|
||||
|
||||
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(title)
|
||||
.setCancelable(true)
|
||||
.setInput(true)
|
||||
|
@ -324,7 +324,7 @@ public class LoginActivity extends AbsActivity {
|
||||
home_zdy_img_cn = obj.getString("home_zdy_img_cn");
|
||||
}
|
||||
MainActivity.forward(LoginActivity.this, false);
|
||||
//gotoLive(obj.getString("anchor_id"));
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
IMLoginManager.get(mContext).setisNewUserOne(true);
|
||||
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||
if (obj.containsKey("home_zdy_pop")) {
|
||||
|
Loading…
Reference in New Issue
Block a user