From 4772b0348aa32482ea8f01a029180e316b2e93af Mon Sep 17 00:00:00 2001 From: bangdc90 <65581036+bangdc90@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:37:49 +0700 Subject: [PATCH] =?UTF-8?q?Fix=20issue=20can=E2=80=99t=20toggle=20VR=20mod?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using editor.commit() instead of editor.apply() because app will restart after changing mode, so mode need to be saved before restarting --- app/src/main/java/com/openipc/pixelpilot/VideoActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java b/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java index 5642d4f..56293a0 100644 --- a/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java +++ b/app/src/main/java/com/openipc/pixelpilot/VideoActivity.java @@ -107,7 +107,7 @@ public void setVRSetting(boolean v) SharedPreferences prefs = getSharedPreferences("general", Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("vr-mode", v); - editor.apply(); + editor.commit(); } public static int getChannel(Context context) {