Skip to content

Commit

Permalink
Add autoExpandDescription to legacy preunifiedfixes TeamNewPipe/NewPi…
Browse files Browse the repository at this point in the history
  • Loading branch information
ShareASmile committed Jun 16, 2024
1 parent 7bd2291 commit 08ecd4b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,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(final int sid, final String u, final String title) {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/settings_keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1171,5 +1171,6 @@
<item>@string/grid</item>
</string-array>

<string name="always_expand_description_key" translatable="false">always_expand_description</string>
<string name="recaptcha_cookies_key" translatable="false">recaptcha_cookies_key</string>
</resources>
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@
<string name="channel_created_by">Created by %s</string>
<string name="video_detail_by">By %s</string>
<string name="playlist_page_summary">Playlist page</string>
<string name="detail_heart_img_view_description">Hearted by creator</string>
<string name="recent">Recent</string>
<string name="featured">Featured</string>
<string name="radio">Radio</string>
Expand All @@ -680,4 +679,6 @@
<string name="private_content">This content is private, so it cannot be streamed or downloaded by NewPipe.</string>
<string name="youtube_music_premium_content">This video is available only to YouTube Music Premium members, so it cannot be streamed or downloaded by NewPipe.</string>
<string name="paid_content">This content is only available to users who have paid, so it cannot be streamed or downloaded by NewPipe.</string>
<string name="always_expand_description">Always expand description</string>
<string name="detail_heart_img_view_description">Hearted by creator</string>
</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/xml/appearance_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@
android:title="@string/caption_setting_title"
android:summary="@string/caption_setting_description"/>

<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="false"
android:key="@string/always_expand_description_key"
android:title="@string/always_expand_description"/>
</PreferenceScreen>

0 comments on commit 08ecd4b

Please sign in to comment.