Browse Source

Merge pull request #1706 from nextcloud/bugfix/1694/camIconStateFix

make all cam buttons reflect current state instead of triggered action
Andy Scherzinger 3 năm trước cách đây
mục cha
commit
bc85337f5f

+ 6 - 6
app/src/main/java/com/nextcloud/talk/models/TakePictureViewModel.java

@@ -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);
     }
 }

+ 1 - 1
scripts/analysis/lint-results.txt

@@ -1,2 +1,2 @@
 DO NOT TOUCH; GENERATED BY DRONE
-      <span class="mdl-layout-title">Lint Report: 1 error and 222 warnings</span>
+      <span class="mdl-layout-title">Lint Report: 1 error and 223 warnings</span>