From 85659e82a2caeb4378661c978e16ac3b69577e68 Mon Sep 17 00:00:00 2001 From: bopol Date: Fri, 24 Jan 2020 15:44:00 +0100 Subject: [PATCH] =?UTF-8?q?add=20=C2=ABAlways=20expand=20description=C2=BB?= =?UTF-8?q?=20in=20appearance=20settings,=20closes=20#1113?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 5 +++++ app/src/main/res/values/settings_keys.xml | 2 +- app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/appearance_settings.xml | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index b28c71d7216..91e51129716 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -974,6 +974,11 @@ private void setHeightThumbnail() { private void showContent() { contentRootLayoutHiding.setVisibility(View.VISIBLE); + final boolean showDescriptionOnLoad = PreferenceManager.getDefaultSharedPreferences(activity) + .getBoolean(getString(R.string.always_expand_description_key), false); + if (showDescriptionOnLoad) { + toggleTitleAndDescription(); + } } protected void setInitialData(int serviceId, String url, String name) { diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index fe096c9fddd..8b47ec365fa 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -1094,5 +1094,5 @@ @string/list @string/grid - + always_expand_description diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 42b4b77c594..e27f82e9dd4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -596,4 +596,5 @@ %s seconds + Always expand description diff --git a/app/src/main/res/xml/appearance_settings.xml b/app/src/main/res/xml/appearance_settings.xml index b5f222130c7..2a26f2ad3fb 100644 --- a/app/src/main/res/xml/appearance_settings.xml +++ b/app/src/main/res/xml/appearance_settings.xml @@ -48,4 +48,9 @@ android:key="@string/main_page_content_key" android:title="@string/main_page_content"/> +