Merge pull request #388 from Bnyro/master

noInternet Activity crash fixed
This commit is contained in:
Bnyro 2022-06-05 19:49:39 +02:00 committed by GitHub
commit 19c64f122f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -282,8 +282,13 @@ class MainActivity : AppCompatActivity() {
}
}
} catch (e: Exception) {
// try catch to prevent nointernet activity to crash
try {
navController.popBackStack()
moveTaskToBack(true)
} catch (e: Exception) {
super.onBackPressed()
}
}
}

View File

@ -39,6 +39,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/retry"
android:textColor="?android:attr/colorBackground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/noInternet_textView" />