From 86fa629591cead25ed76a5e9a2f3249478687758 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 ccc73e81f..e07be0c21 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 final class PlayerHelper { 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; }