File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/src/main/java/com/infomaniak/mail/utils Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -467,11 +467,11 @@ fun Fragment.changeToolbarColorOnScroll(
467467 val isAtTheTop = view.isAtTheTop()
468468 if (! isAtTheTop && headerColorState == HeaderState .ELEVATED ) return @setOnScrollChangeListener
469469
470+ headerColorState = if (isAtTheTop) HeaderState .LOWERED else HeaderState .ELEVATED
471+
470472 val newColor = view.context.getColor(if (isAtTheTop) loweredColor else elevatedColor)
471473 if (newColor == oldColor) return @setOnScrollChangeListener
472474
473- headerColorState = if (isAtTheTop) HeaderState .LOWERED else HeaderState .ELEVATED
474-
475475 valueAnimator?.cancel()
476476 valueAnimator = UiUtils .animateColorChange(oldColor, newColor, animate = true ) { color ->
477477 oldColor = color
You can’t perform that action at this time.
0 commit comments