Actually fix camera icon tint bug

This commit is contained in:
Matéo Duparc 2022-05-01 19:48:16 +02:00
parent ec348383c6
commit 5ea0b8ad41
Signed by untrusted user: hardcoresushi
GPG Key ID: AFE384344A45E13A

View File

@ -221,7 +221,7 @@ class CameraActivity : BaseActivity(), SensorOrientationListener.Listener {
requestPermissions(arrayOf(Manifest.permission.RECORD_AUDIO), AUDIO_PERMISSION_REQUEST_CODE)
}
}
binding.imageModeSwitch.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.icon_photo)?.also {
binding.imageModeSwitch.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.icon_photo)?.mutate()?.also {
it.setTint(ContextCompat.getColor(this, R.color.neutralIconTint))
})
imageCapture?.flashMode = ImageCapture.FLASH_MODE_OFF