Hide single media with preview is now a setting (default: disabled)

fix_reports
Thomas 2 years ago
parent 21abe0e297
commit a1f97d7cfa

@ -407,6 +407,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
boolean displayReactions = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_REACTIONS) + MainActivity.currentUserID + MainActivity.currentInstance, true);
boolean compactButtons = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_COMPACT_ACTION_BUTTON), false);
boolean originalDateForBoost = sharedpreferences.getBoolean(context.getString(R.string.SET_BOOST_ORIGINAL_DATE), true);
boolean hideSingleMediaWithCard = sharedpreferences.getBoolean(context.getString(R.string.SET_HIDE_SINGLE_MEDIA_WITH_CARD), false);
if (compactButtons) {
ConstraintSet set = new ConstraintSet();
@ -1343,7 +1344,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
//--- MEDIA ATTACHMENT ---
boolean cardDisplayed = (statusToDeal.card != null && (display_card || statusToDeal.isFocused) && statusToDeal.quote_id == null);
if (statusToDeal.media_attachments != null && statusToDeal.media_attachments.size() > 0 && (!cardDisplayed || statusToDeal.media_attachments.size() > 1)) {
if (statusToDeal.media_attachments != null && statusToDeal.media_attachments.size() > 0 && (!hideSingleMediaWithCard || !cardDisplayed || statusToDeal.media_attachments.size() > 1)) {
holder.binding.attachmentsList.removeAllViews();
holder.binding.mediaContainer.removeAllViews();

@ -1480,7 +1480,7 @@
<string name="SET_EXPAND_MEDIA" translatable="false">SET_EXPAND_MEDIA</string>
<string name="SET_GROUP_REBLOGS" translatable="false">SET_GROUP_REBLOGS</string>
<string name="SET_BOOST_ORIGINAL_DATE" translatable="false">SET_BOOST_ORIGINAL_DATE</string>
<string name="SET_HIDE_SINGLE_MEDIA_WITH_CARD" translatable="false">SET_HIDE_SINGLE_MEDIA_WITH_CARD</string>
<string name="SET_LIVE_TRANSLATE" translatable="false">SET_LIVE_TRANSLATE</string>
<string name="SET_TRUNCATE_TOOTS_SIZE" translatable="false">SET_TRUNCATE_TOOTS_SIZE</string>
<string name="SET_ART_WITH_NSFW" translatable="false">SET_ART_WITH_NSFW</string>
@ -2223,4 +2223,5 @@
<string name="formula">Formula</string>
<string name="set_maths_support">Write formula</string>
<string name="maths_format">Maths format</string>
<string name="hide_single_media_with_card">Hide single media when there is a link preview</string>
</resources>

@ -31,6 +31,13 @@
app:key="@string/SET_BOOST_ORIGINAL_DATE"
app:singleLineTitle="false"
app:title="@string/boost_original_date" />
<SwitchPreferenceCompat
android:defaultValue="false"
app:iconSpaceReserved="false"
app:key="@string/SET_HIDE_SINGLE_MEDIA_WITH_CARD"
app:singleLineTitle="false"
app:title="@string/hide_single_media_with_card" />
<ListPreference
android:defaultValue="default"
app:entries="@array/SET_LIVE_TRANSLATE_VALUES"

@ -0,0 +1,8 @@
Added:
- Maths support (view and compose)
Changed:
- Hide single media with preview is now a setting (default: disabled)
Fixed:
-
Loading…
Cancel
Save