mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Further improvements to resuming the app (#577)
## Description Fixes issues when the app is resumed, such as after the screensaver is dismissed. For example, if you pause during playback and the screensaver starts, Wholphin will stop playback and go back to the previous page. But with this PR, instead of focus being lost and defaulting to teh nav drawer, focus will restore on the play button or episode card. ### Related issues Related to #552 & https://github.com/damontecres/Wholphin/issues/552#issuecomment-3690614491
This commit is contained in:
parent
bdec72752d
commit
a797bd8267
9 changed files with 127 additions and 94 deletions
|
|
@ -230,7 +230,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
Timber.i("onResume")
|
||||
Timber.d("onResume")
|
||||
lifecycleScope.launchIO {
|
||||
appUpgradeHandler.run()
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
override fun onRestart() {
|
||||
super.onRestart()
|
||||
Timber.i("onRestart")
|
||||
Timber.d("onRestart")
|
||||
viewModel.appStart()
|
||||
// val signInAutomatically =
|
||||
// runBlocking { userPreferencesDataStore.data.firstOrNull()?.signInAutomatically } ?: true
|
||||
|
|
@ -250,35 +250,35 @@ class MainActivity : AppCompatActivity() {
|
|||
// }
|
||||
}
|
||||
|
||||
// override fun onStop() {
|
||||
// super.onStop()
|
||||
// Timber.i("onStop")
|
||||
// }
|
||||
//
|
||||
// override fun onPause() {
|
||||
// super.onPause()
|
||||
// Timber.i("onPause")
|
||||
// }
|
||||
//
|
||||
// override fun onStart() {
|
||||
// super.onStart()
|
||||
// Timber.i("onStart")
|
||||
// }
|
||||
//
|
||||
// override fun onSaveInstanceState(outState: Bundle) {
|
||||
// super.onSaveInstanceState(outState)
|
||||
// Timber.i("onSaveInstanceState")
|
||||
// }
|
||||
//
|
||||
// override fun onRestoreInstanceState(savedInstanceState: Bundle) {
|
||||
// super.onRestoreInstanceState(savedInstanceState)
|
||||
// Timber.i("onRestoreInstanceState")
|
||||
// }
|
||||
//
|
||||
// override fun onDestroy() {
|
||||
// super.onDestroy()
|
||||
// Timber.i("onDestroy")
|
||||
// }
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
Timber.d("onStop")
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
Timber.d("onPause")
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
Timber.d("onStart")
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
Timber.d("onSaveInstanceState")
|
||||
}
|
||||
|
||||
override fun onRestoreInstanceState(savedInstanceState: Bundle) {
|
||||
super.onRestoreInstanceState(savedInstanceState)
|
||||
Timber.d("onRestoreInstanceState")
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
Timber.d("onDestroy")
|
||||
}
|
||||
}
|
||||
|
||||
@HiltViewModel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue