diff options
4 files changed, 19 insertions, 2 deletions
diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index eeff36c46..b15fd9928 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -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(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 410a27582..5ccfbfec7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -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>
\ No newline at end of file diff --git a/app/src/main/res/xml/pref_timelines.xml b/app/src/main/res/xml/pref_timelines.xml index a389ed08b..f2ceb3f25 100644 --- a/app/src/main/res/xml/pref_timelines.xml +++ b/app/src/main/res/xml/pref_timelines.xml @@ -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" diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/468.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/468.txt new file mode 100644 index 000000000..83310083d --- /dev/null +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/468.txt @@ -0,0 +1,8 @@ +Added: +- Maths support (view and compose) + +Changed: +- Hide single media with preview is now a setting (default: disabled) + +Fixed: +-
\ No newline at end of file |