Merge pull request #214 from Bnyro/settings

Fixed Settings Loop on Back Pressed
This commit is contained in:
Kavin 2022-05-15 04:40:06 +01:00 committed by GitHub
commit c6c4cdfd2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,14 +256,12 @@ class MainActivity : AppCompatActivity() {
}else{ }else{
navController.popBackStack() navController.popBackStack()
if (navController.currentBackStackEntry == null){ if (navController.currentBackStackEntry == null){
super.onBackPressed() moveTaskToBack(true)
} }
} }
}catch (e: Exception){ }catch (e: Exception){
navController.popBackStack() navController.popBackStack()
if (navController.currentBackStackEntry == null){ moveTaskToBack(true)
super.onBackPressed()
}
} }
} }
override fun onConfigurationChanged(newConfig: Configuration) { override fun onConfigurationChanged(newConfig: Configuration) {