Skip to content

Commit

Permalink
[fix]: dock shown after configuration change
Browse files Browse the repository at this point in the history
  • Loading branch information
F0x1d committed Oct 6, 2023
1 parent 05f05a2 commit 39455d4
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions app/src/main/java/com/f0x1d/logfox/ui/activity/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import androidx.navigation.NavDestination
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import androidx.transition.ChangeBounds
import androidx.transition.Transition
import androidx.transition.Transition.TransitionListener
import androidx.transition.TransitionManager
import com.f0x1d.logfox.NavGraphDirections
import com.f0x1d.logfox.R
Expand All @@ -36,7 +34,7 @@ class MainActivity: BaseViewModelActivity<MainViewModel, ActivityMainBinding>(),

private val requestNotificationPermissionLauncher = registerForActivityResult(ActivityResultContracts.RequestPermission()) {}

private var barShown = false
private var barShown = true
private val barScene by lazy {
ConstraintSet().apply {
clone(this@MainActivity, R.layout.activity_main)
Expand All @@ -50,16 +48,6 @@ class MainActivity: BaseViewModelActivity<MainViewModel, ActivityMainBinding>(),
private val changeBoundsTransition by lazy {
ChangeBounds().apply {
duration = resources.getInteger(androidx.navigation.ui.R.integer.config_navAnimTime).toLong()

addListener(object : TransitionListener {
override fun onTransitionStart(transition: Transition) {}
override fun onTransitionEnd(transition: Transition) {
TransitionManager.endTransitions(binding.root)
}
override fun onTransitionCancel(transition: Transition) {}
override fun onTransitionPause(transition: Transition) {}
override fun onTransitionResume(transition: Transition) {}
})
}
}

Expand Down

0 comments on commit 39455d4

Please sign in to comment.