make all cam buttons reflect current state instead of triggered action

Resolves #1694

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-11-17 14:57:08 +01:00 committed by Marcel Hibbe (Rebase PR Action)
parent 1ef400c55a
commit 47aa8ea5d4

View File

@ -99,19 +99,19 @@ public class TakePictureViewModel extends ViewModel {
public LiveData<Integer> getTorchToggleButtonImageResource() {
return Transformations.map(isTorchEnabled(), enabled -> enabled
? R.drawable.ic_baseline_flash_off_24
: R.drawable.ic_baseline_flash_on_24);
? R.drawable.ic_baseline_flash_on_24
: R.drawable.ic_baseline_flash_off_24);
}
public LiveData<Integer> getLowResolutionToggleButtonImageResource() {
return Transformations.map(isLowResolutionEnabled(), enabled -> enabled
? R.drawable.ic_high_quality
: R.drawable.ic_low_quality);
? R.drawable.ic_low_quality
: R.drawable.ic_high_quality);
}
public LiveData<Integer> getCropToggleButtonImageResource() {
return Transformations.map(isCropEnabled(), enabled -> enabled
? R.drawable.ic_crop_4_3
: R.drawable.ic_crop_16_9);
? R.drawable.ic_crop_16_9
: R.drawable.ic_crop_4_3);
}
}