From ddb68cb41a1d60dde082e108a77271c22531fef5 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Mon, 8 Mar 2021 09:46:05 +0100 Subject: [PATCH] Fix last resize mode not being restored correctly I think the settings key "last_resize_mode" is ambiguous. While it is used to get the recently used resize mode, someone thought while working on the resize mode switcher, that the old (to be replaced) resize mode should be stored. Fixes #5613 --- .../java/org/schabi/newpipe/player/helper/PlayerHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index ccc73e81f97..e07be0c21f1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -484,8 +484,9 @@ public static int nextResizeModeAndSaveToPrefs(final Player player, break; } + // save the new resize mode so it can be restored in a future session player.getPrefs().edit().putInt( - player.getContext().getString(R.string.last_resize_mode), resizeMode).apply(); + player.getContext().getString(R.string.last_resize_mode), newResizeMode).apply(); return newResizeMode; }