Fix volume monitor scrolling

This commit is contained in:
edr
2024-02-17 01:17:41 +01:00
committed by GitHub
parent 7359716c09
commit 0ae2ca4a65

View File

@@ -78,9 +78,9 @@ public class VolumeView extends View {
final double graphHeight = height - 2.0 * margins;
final double graphScale = graphHeight * volumeNorm;
int xPrev = 0;
int yPrev = ((int) (margins + graphHeight - volumeHistory.get(0) * graphScale));
int yPrev = ((int) (margins + graphHeight - history.get(0) * graphScale));
for (int xNext = 1; xNext < size; ++xNext) {
int yNext = (int) (margins + graphHeight - volumeHistory.get(xNext) * graphScale);
int yNext = (int) (margins + graphHeight - history.get(xNext) * graphScale);
canvas.drawLine(xPrev, yPrev, xNext, yNext, paint);
xPrev = xNext;
yPrev = yNext;