1
0
Fork 0

For #4863 - Remove delay in HomeFragment onPreDraw

master
Emily Kager 2019-08-28 10:21:30 -07:00 committed by Emily Kager
parent 66a8c04967
commit 7b5ed2673b
1 changed files with 0 additions and 6 deletions

View File

@ -7,7 +7,6 @@ package org.mozilla.fenix.utils
import androidx.core.view.doOnPreDraw
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
/**
@ -23,14 +22,9 @@ class FragmentPreDrawManager(
fun execute(code: () -> Unit) {
fragment.view?.doOnPreDraw {
fragment.viewLifecycleOwner.lifecycleScope.launch {
delay(ANIM_SCROLL_DELAY)
code()
fragment.startPostponedEnterTransition()
}
}
}
companion object {
private const val ANIM_SCROLL_DELAY = 100L
}
}