mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
noInternet Activity crash fixed
This commit is contained in:
parent
cbf05d292b
commit
52be2cb8b7
@ -282,8 +282,13 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
navController.popBackStack()
|
||||
moveTaskToBack(true)
|
||||
// try catch to prevent nointernet activity to crash
|
||||
try {
|
||||
navController.popBackStack()
|
||||
moveTaskToBack(true)
|
||||
} catch (e: Exception){
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user