Skip to content

Commit

Permalink
add «Always expand description» in appearance settings, closes #1113
Browse files Browse the repository at this point in the history
  • Loading branch information
B0pol committed Mar 1, 2020
1 parent 4674431 commit 85659e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/settings_keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1094,5 +1094,5 @@
<item>@string/list</item>
<item>@string/grid</item>
</string-array>

<string name="always_expand_description_key" translatable="false">always_expand_description</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -596,4 +596,5 @@
<plurals name="dynamic_seek_duration_description">
<item quantity="other">%s seconds</item>
</plurals>
<string name="always_expand_description">Always expand description</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 @@ -48,4 +48,9 @@
android:key="@string/main_page_content_key"
android:title="@string/main_page_content"/>

<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 85659e8

Please sign in to comment.