Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c5f5358 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

Issue 1201: Show error dialogs only if internet connection is present

parent 918e181f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -211,10 +211,11 @@ abstract class TimeoutFragment(@LayoutRes layoutId: Int) : Fragment(layoutId) {
     * Show a dialog, dismiss previously shown dialog in [lastDialog].
     */
    private fun showAndSetDialog(alertDialogBuilder: AlertDialog.Builder) {
        alertDialogBuilder.create().run {
        if (lastDialog?.isShowing == true) {
            lastDialog?.dismiss()
        }
        if (mainActivityViewModel.internetConnection.value != true) return
        alertDialogBuilder.create().run {
            this.show()
            lastDialog = this
        }