mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-13 00:05:08 +01:00
wrap if's in {} for readability
This commit is contained in:
parent
3240260a91
commit
4e44ee3605
@ -21,7 +21,6 @@ import android.view.WindowManager
|
|||||||
import android.view.animation.Animation
|
import android.view.animation.Animation
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import android.widget.SeekBar
|
import android.widget.SeekBar
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.core.graphics.ColorUtils
|
import androidx.core.graphics.ColorUtils
|
||||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||||
@ -247,10 +246,10 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
||||||
super.onWindowFocusChanged(hasFocus)
|
super.onWindowFocusChanged(hasFocus)
|
||||||
if (hasFocus) {
|
if (hasFocus) {
|
||||||
if (menuStickyVisible)
|
when (menuStickyVisible) {
|
||||||
setMenuVisibility(false)
|
true -> setMenuVisibility(false)
|
||||||
else
|
false -> setMenuVisibility(menuVisible, animate = false)
|
||||||
setMenuVisibility(menuVisible, animate = false)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,10 +375,13 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
snackbar?.dismiss()
|
snackbar?.dismiss()
|
||||||
systemUi?.show()
|
systemUi?.show()
|
||||||
reader_menu.visibility = View.VISIBLE
|
reader_menu.visibility = View.VISIBLE
|
||||||
if (chapters_bottom_sheet.sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED)
|
|
||||||
|
if (chapters_bottom_sheet.sheetBehavior?.state == BottomSheetBehavior.STATE_EXPANDED) {
|
||||||
chapters_bottom_sheet.sheetBehavior?.isHideable = false
|
chapters_bottom_sheet.sheetBehavior?.isHideable = false
|
||||||
if (chapters_bottom_sheet.sheetBehavior?.state != BottomSheetBehavior.STATE_EXPANDED && sheetManageNavColor)
|
}
|
||||||
|
if (chapters_bottom_sheet.sheetBehavior?.state != BottomSheetBehavior.STATE_EXPANDED && sheetManageNavColor) {
|
||||||
window.navigationBarColor = Color.TRANSPARENT // getResourceColor(R.attr.colorPrimaryDark)
|
window.navigationBarColor = Color.TRANSPARENT // getResourceColor(R.attr.colorPrimaryDark)
|
||||||
|
}
|
||||||
if (animate) {
|
if (animate) {
|
||||||
if (!menuStickyVisible) {
|
if (!menuStickyVisible) {
|
||||||
val toolbarAnimation = AnimationUtils.loadAnimation(this, R.anim.enter_from_top)
|
val toolbarAnimation = AnimationUtils.loadAnimation(this, R.anim.enter_from_top)
|
||||||
|
Loading…
Reference in New Issue
Block a user