diff --git a/app/src/main/java/me/immathan/kotlinlogin/ui/base/BaseActivity.kt b/app/src/main/java/me/immathan/kotlinlogin/ui/base/BaseActivity.kt index 35d9010..99dd563 100644 --- a/app/src/main/java/me/immathan/kotlinlogin/ui/base/BaseActivity.kt +++ b/app/src/main/java/me/immathan/kotlinlogin/ui/base/BaseActivity.kt @@ -59,7 +59,13 @@ abstract class BaseActivity : AppCompatActivity(), MvpView { } override fun hideProgress() { - mProgressDialog?.hide() + + mProgressDialog?.let{dialog-> + if(dialog.isShowing){ + dialog.hide() + } + } + } override fun showMessage(message: String) { @@ -83,4 +89,4 @@ abstract class BaseActivity : AppCompatActivity(), MvpView { } -} \ No newline at end of file +}