diff --git a/app/src/main/kotlin/de/rochefort/childmonitor/ListenActivity.kt b/app/src/main/kotlin/de/rochefort/childmonitor/ListenActivity.kt index 14501d6..f823f35 100644 --- a/app/src/main/kotlin/de/rochefort/childmonitor/ListenActivity.kt +++ b/app/src/main/kotlin/de/rochefort/childmonitor/ListenActivity.kt @@ -47,7 +47,7 @@ class ListenActivity : Activity() { val connectedText = findViewById(R.id.connectedTo) connectedText.text = bs.childDeviceName val volumeView = findViewById(R.id.volume) - volumeView.setVolumeHistory(bs.volumeHistory) + volumeView.volumeHistory = bs.volumeHistory bs.setUpdateCallback { volumeView.postInvalidate() } bs.setErrorCallback { postErrorMessage() } } diff --git a/app/src/main/kotlin/de/rochefort/childmonitor/VolumeView.kt b/app/src/main/kotlin/de/rochefort/childmonitor/VolumeView.kt index 67d6b95..3df2323 100644 --- a/app/src/main/kotlin/de/rochefort/childmonitor/VolumeView.kt +++ b/app/src/main/kotlin/de/rochefort/childmonitor/VolumeView.kt @@ -26,7 +26,7 @@ import kotlin.math.min class VolumeView : View { private val paint: Paint - private var volumeHistory: VolumeHistory? = null + public var volumeHistory: VolumeHistory? = null constructor(context: Context?) : super(context) { paint = initPaint() @@ -85,8 +85,4 @@ class VolumeView : View { yPrev = yNext } } - - fun setVolumeHistory(volumeHistory: VolumeHistory?) { - this.volumeHistory = volumeHistory - } }