commit | 22292a6a623fa166e8fcdf1158e77930f298ebc4 | [log] [tgz] |
---|---|---|
author | LuK1337 <priv.luk@gmail.com> | Tue Aug 09 14:38:43 2022 +0200 |
committer | LuK1337 <priv.luk@gmail.com> | Thu Sep 29 22:22:54 2022 +0200 |
tree | 7213ebea7a6bb2ee6d18a67807c4d73639430f12 | |
parent | 131ca005a43746b3b1d85a72ff097e5a9204cf2e [diff] |
Aperture: Make sure we only have one torch/zoom state observer Change-Id: Icdcea60450bb05bd2138cf20054cb385bd5a1608
diff --git a/app/src/main/java/org/lineageos/aperture/MainActivity.kt b/app/src/main/java/org/lineageos/aperture/MainActivity.kt index 49b249c..d0d0efb 100644 --- a/app/src/main/java/org/lineageos/aperture/MainActivity.kt +++ b/app/src/main/java/org/lineageos/aperture/MainActivity.kt
@@ -423,6 +423,7 @@ } // Observe zoom state + cameraController.zoomState.removeObservers(this) cameraController.zoomState.observe(this) { zoomLevel.valueFrom = it.minZoomRatio zoomLevel.valueTo = it.maxZoomRatio @@ -434,6 +435,7 @@ } // Observe torch state + cameraController.torchState.removeObservers(this) cameraController.torchState.observe(this) { updateTorchModeIcon() }