Skip to content

Commit

Permalink
Fix spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark25 committed Nov 8, 2024
1 parent 51edde2 commit 0a596bf
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -572,19 +572,22 @@ class PlayerActivity : BaseActivity() {
} catch (e: Exception) {
logcat(LogPriority.ERROR, e) { "Service the google play services not available" }
}
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (supportedAndEnabled) {
if (player.paused == false && playerPreferences.pipOnExit().get()) {
updatePip(true)
onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (supportedAndEnabled) {
if (player.paused == false && playerPreferences.pipOnExit().get()) {
updatePip(true)
} else {
finishAndRemoveTask()
}
} else {
finishAndRemoveTask()
}
} else {
finishAndRemoveTask()
}
}
})
},
)
}
private fun copyAssets(configDir: String) {
val assetManager = this.assets
Expand Down Expand Up @@ -1091,7 +1094,6 @@ class PlayerActivity : BaseActivity() {
super.onDestroy()
}


override fun onUserLeaveHint() {
if (player.paused == false &&
playerPreferences.pipOnExit().get() &&
Expand Down

0 comments on commit 0a596bf

Please sign in to comment.