Skip to content

Commit

Permalink
Disable some animations for e-ink
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Dec 27, 2024
1 parent 2d2ee7a commit 20b2f57
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1297,12 +1297,22 @@ class MainBibleActivity : CustomTitlebarActivityBase() {
.translationY(binding.speakTransport.height.toFloat())
.setInterpolator(AccelerateInterpolator())
.withEndAction { binding.speakTransport.visibility = View.GONE }
.apply {
if(CommonUtils.settings.disableAnimations) {
duration = 0
}
}
.start()
} else {
binding.speakTransport.visibility = View.VISIBLE
binding.speakTransport.animate()
.translationY(-bottomOffset1.toFloat())
.setInterpolator(DecelerateInterpolator())
.apply {
if(CommonUtils.settings.disableAnimations) {
duration = 0
}
}
.start()
}
ABEventBus.post(UpdateRestoreWindowButtons())
Expand Down Expand Up @@ -1486,7 +1496,11 @@ class MainBibleActivity : CustomTitlebarActivityBase() {
toolbarLayout.animate().translationY(-toolbarLayout.height.toFloat())
.setInterpolator(AccelerateInterpolator())
.withEndAction { toolbarLayout.visibility = View.GONE }
.start()
.apply {
if(CommonUtils.settings.disableAnimations) {
duration = 0
}
}.start()
}
else {
showSystemUI()
Expand All @@ -1495,7 +1509,11 @@ class MainBibleActivity : CustomTitlebarActivityBase() {
toolbarLayout.visibility = View.VISIBLE
toolbarLayout.animate().translationY(topOffset1.toFloat())
.setInterpolator(DecelerateInterpolator())
.start()
.apply {
if(CommonUtils.settings.disableAnimations) {
duration = 0
}
}.start()
updateActions()
}
}
Expand Down

0 comments on commit 20b2f57

Please sign in to comment.