Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 202a6081 authored by Hawkwood Glazier's avatar Hawkwood Glazier
Browse files

Set clock alpha when contraints are built

Bug: 371536168
Test: Manually checked a bunch of transitions
Flag: NONE Partial Revert
Change-Id: I5bb9807a5862ab1fef268f956acaf839a3ee2f0c
parent 19131b50
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -53,6 +53,9 @@ import kotlinx.coroutines.DisposableHandle
internal fun ConstraintSet.setVisibility(views: Iterable<View>, visibility: Int) =
    views.forEach { view -> this.setVisibility(view.id, visibility) }

internal fun ConstraintSet.setAlpha(views: Iterable<View>, alpha: Float) =
    views.forEach { view -> this.setAlpha(view.id, alpha) }

internal fun ConstraintSet.setScaleX(views: Iterable<View>, scaleX: Float) =
    views.forEach { view -> this.setScaleX(view.id, scaleX) }

@@ -123,6 +126,8 @@ constructor(
        return constraintSet.apply {
            setVisibility(getTargetClockFace(clock).views, VISIBLE)
            setVisibility(getNonTargetClockFace(clock).views, GONE)
            setAlpha(getTargetClockFace(clock).views, 1F)
            setAlpha(getNonTargetClockFace(clock).views, 0F)
            if (!keyguardClockViewModel.isLargeClockVisible.value) {
                connect(sharedR.id.bc_smartspace_view, TOP, sharedR.id.date_smartspace_view, BOTTOM)
            } else {