Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWN-9104 - block user on dialog AnimationProgressFragment.kt #1893

Merged
2 commits merged into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading