Skip to content

Commit

Permalink
fix: disable instant camera
Browse files Browse the repository at this point in the history
Signed-off-by: qwq233 <[email protected]>
  • Loading branch information
qwq233 committed Nov 21, 2024
1 parent d177788 commit 52a9970
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ private static boolean isWhitelisted(MediaCodecInfo codecInfo) {
public static boolean adaptableColorInBrowser = true;
public static boolean onlyLocalInstantView = false;
public static boolean directShare = true;
public static boolean inappCamera = true;
public static boolean inappCamera = !Config.disableInstantCamera;
public static boolean roundCamera16to9 = true;
public static boolean noSoundHintShowed = false;
public static boolean streamMedia = true;
Expand Down Expand Up @@ -866,7 +866,7 @@ public static void loadConfig() {
directShare = preferences.getBoolean("direct_share", true);
shuffleMusic = preferences.getBoolean("shuffleMusic", false);
playOrderReversed = !shuffleMusic && preferences.getBoolean("playOrderReversed", false);
inappCamera = preferences.getBoolean("inappCamera", true);
inappCamera = !Config.disableInstantCamera;
hasCameraCache = preferences.contains("cameraCache");
roundCamera16to9 = true;
repeatMode = preferences.getInt("repeatMode", 0);
Expand Down Expand Up @@ -1619,10 +1619,7 @@ public static void toggleForceDisableTabletMode() {

public static void toggleInappCamera() {
inappCamera = !inappCamera;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("inappCamera", inappCamera);
editor.apply();
Config.toggleDisableInstantCamera();
}

public static void toggleRoundCamera16to9() {
Expand Down

0 comments on commit 52a9970

Please sign in to comment.