Skip to content

Commit

Permalink
PWN-9104 - block user on dialog AnimationProgressFragment.kt (#1893)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabramovp2p authored Jun 29, 2023
1 parent 1678d5d commit b7a8762
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.p2p.wallet.auth.ui.animationscreen

import android.os.Bundle
import android.view.View
import androidx.activity.addCallback
import androidx.core.view.isVisible
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.lifecycleScope
import androidx.transition.TransitionManager
import android.os.Bundle
import android.view.View
import kotlin.time.Duration.Companion.seconds
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.asFlow
Expand All @@ -17,7 +19,6 @@ import org.p2p.wallet.databinding.FragmentAnimationProgressBinding
import org.p2p.wallet.utils.args
import org.p2p.wallet.utils.viewbinding.viewBinding
import org.p2p.wallet.utils.withArgs
import kotlin.time.Duration.Companion.seconds

private const val ARG_TIMER_STATE_LIST = "ARG_TIMER_STATE_LIST"

Expand Down Expand Up @@ -81,6 +82,9 @@ class AnimationProgressFragment : BaseFragment(R.layout.fragment_animation_progr
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setLoadingAnimationState(isScreenLoading = true)
requireActivity().onBackPressedDispatcher.addCallback(viewLifecycleOwner) {
// ignore back pressing on this dialog
}
}

private fun setLoadingAnimationState(isScreenLoading: Boolean) {
Expand Down

0 comments on commit b7a8762

Please sign in to comment.