Skip to content

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
malinajirka committed Apr 7, 2020
1 parent 1eebd97 commit bfdf6bf
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ class SiteCreationPreviewFragment : SiteCreationBaseFormFragment(),

private fun updateLoadingTextWithFadeAnimation(newText: String) {
val animationDuration = AniUtils.Duration.SHORT
val animations = ArrayList<Animator>()
val fadeOut = AniUtils.getFadeOutAnim(loadingTextLayout, animationDuration, View.VISIBLE)
val fadeIn = AniUtils.getFadeInAnim(loadingTextLayout, animationDuration)

Expand All @@ -254,11 +253,10 @@ class SiteCreationPreviewFragment : SiteCreationBaseFormFragment(),
// Start the fadein animation right after the view fades out
fadeIn.startDelay = animationDuration.toMillis(loadingTextLayout.context)

val animatorSet = AnimatorSet()
animations.add(fadeOut)
animations.add(fadeIn)
animatorSet.playSequentially(animations)
animatorSet.start()
AnimatorSet().apply {
playSequentially(fadeOut, fadeIn)
start()
}
}

private fun updateErrorLayout(errorUiStateState: SitePreviewFullscreenErrorUiState) {
Expand Down

0 comments on commit bfdf6bf

Please sign in to comment.