修复启动时出现闪退日志的问题(DialogFragment问题)

This commit is contained in:
老皮 2024-11-04 10:39:23 +08:00
parent d56d9d8f45
commit d2f508699c
2 changed files with 16 additions and 4 deletions

View File

@ -5342,6 +5342,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
String isFreeGift = newPeopleTask.getIs_free_gift(); String isFreeGift = newPeopleTask.getIs_free_gift();
Log.i("TestFreeGift", "newPeopleTask.getIs_free_gift(): " + isFreeGift);
if (taskModel != null) { if (taskModel != null) {
GiftModel giftModel = newPeopleTask.getGift(); GiftModel giftModel = newPeopleTask.getGift();
if (giftModel != null) { if (giftModel != null) {

View File

@ -288,7 +288,13 @@ public class LoginActivity extends AbsActivity {
getBaseUserInfo(); getBaseUserInfo();
} else { } else {
ToastUtil.show(msg); ToastUtil.show(msg);
loadingDialog.dismiss(); try {
if(loadingDialog!=null && loadingDialog.isAdded()){
loadingDialog.dismiss();
}
}catch (Exception e){
e.printStackTrace();
}
} }
} }
@ -321,11 +327,14 @@ public class LoginActivity extends AbsActivity {
} else { } else {
MainActivity.forward(LoginActivity.this, false); MainActivity.forward(LoginActivity.this, false);
} }
if(loadingDialog!=null){ try {
loadingDialog.dismiss(); if(loadingDialog!=null && loadingDialog.isAdded()){
loadingDialog.dismiss();
}
}catch (Exception e){
e.printStackTrace();
} }
finish(); finish();
} }
@Override @Override