1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 11:21:29 +00:00

Make sure dialog is showing before dismissing

This commit is contained in:
Felix Ableitner 2017-08-25 18:50:42 +09:00
parent e89ec17c9f
commit 4c8a98d169
2 changed files with 2 additions and 2 deletions

View file

@ -159,7 +159,7 @@ public class MainActivity extends SyncthingActivity
}
private void dismissDisabledDialog() {
if (mDisabledDialog != null) {
if (mDisabledDialog != null && mDisabledDialog.isShowing()) {
mDisabledDialog.dismiss();
mDisabledDialog = null;
}

View file

@ -143,7 +143,7 @@ public abstract class SyncthingActivity extends ToolbarBindingActivity implement
}
private void dismissLoadingDialog() {
if (mLoadingDialog != null) {
if (mLoadingDialog != null && mLoadingDialog.isShowing()) {
mLoadingDialog.dismiss();
mLoadingDialog = null;
}