Skip to content

Commit

Permalink
For mozilla-mobile#6313 - Remove unneeded delay in BrowserAnimator
Browse files Browse the repository at this point in the history
  • Loading branch information
ekager committed Nov 1, 2020
1 parent 04a7795 commit bf1cb3a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions app/src/main/java/org/mozilla/fenix/browser/BrowserAnimator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.core.graphics.drawable.toDrawable
import androidx.fragment.app.Fragment
import androidx.lifecycle.LifecycleCoroutineScope
import androidx.navigation.NavOptions
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import mozilla.components.concept.engine.EngineView
import org.mozilla.fenix.R
Expand All @@ -38,11 +37,8 @@ class BrowserAnimator(
get() = swipeRefresh.get()

fun beginAnimateInIfNecessary() {
viewLifecycleScope.get()?.launch {
delay(ANIMATION_DELAY)
unwrappedEngineView?.asView()?.visibility = View.VISIBLE
unwrappedSwipeRefresh?.background = null
}
unwrappedEngineView?.asView()?.visibility = View.VISIBLE
unwrappedSwipeRefresh?.background = null
}

/**
Expand Down Expand Up @@ -81,8 +77,6 @@ class BrowserAnimator(
}

companion object {
private const val ANIMATION_DELAY = 100L

fun getToolbarNavOptions(context: Context): NavOptions {
val navOptions = NavOptions.Builder()

Expand Down

0 comments on commit bf1cb3a

Please sign in to comment.