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

Commit d076b96d authored by Ioana Alexandru's avatar Ioana Alexandru Committed by Automerger Merge Worker
Browse files

Merge "Avoid dividing 0 by 0 in StackScrollAlgorithm." into tm-qpr-dev am: 2ba952ac

parents 65d64a2d 2ba952ac
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -884,6 +884,9 @@ public class StackScrollAlgorithm {
                childViewState.zTranslation = baseZ;
            } else {
                float factor = (notificationEnd - shelfStart) / shelfHeight;
                if (Float.isNaN(factor)) { // Avoid problems when the above is 0/0.
                    factor = 1.0f;
                }
                factor = Math.min(factor, 1.0f);
                childViewState.zTranslation = baseZ + factor * zDistanceBetweenElements;
            }