mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-03 14:40:07 +02:00
Fix issue #368 - Allow to enable/disable media in notifications for boost/fav
This commit is contained in:
parent
8b336f1012
commit
15921978d3
4 changed files with 28 additions and 9 deletions
|
@ -277,7 +277,13 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
}
|
||||
} else {
|
||||
holderStatus.bindingNotification.containerTransparent.setVisibility(View.VISIBLE);
|
||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean displayMedia = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_MEDIA_NOTIFICATION), true);
|
||||
if (displayMedia) {
|
||||
holderStatus.bindingNotification.status.mediaContainer.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holderStatus.bindingNotification.status.mediaContainer.setVisibility(View.GONE);
|
||||
}
|
||||
String title = "";
|
||||
MastodonHelper.loadPPMastodon(holderStatus.binding.avatar, notification.account);
|
||||
if (getItemViewType(position) == TYPE_FAVOURITE) {
|
||||
|
|
|
@ -809,6 +809,8 @@
|
|||
<string name="SET_CLEAR_CACHE_EXIT" translatable="false">SET_CLEAR_CACHE_EXIT</string>
|
||||
<string name="SET_DISPLAY_EMOJI" translatable="false">SET_DISPLAY_EMOJI</string>
|
||||
<string name="SET_AGGREGATE_NOTIFICATION" translatable="false">SET_AGGREGATE_NOTIFICATION</string>
|
||||
<string name="SET_DISPLAY_MEDIA_NOTIFICATION" translatable="false">SET_DISPLAY_MEDIA_NOTIFICATION</string>
|
||||
x
|
||||
|
||||
<string name="SET_DISPLAY_CARD" translatable="false">SET_DISPLAY_CARD</string>
|
||||
<string name="SET_DISPLAY_VIDEO_PREVIEWS" translatable="false">SET_DISPLAY_VIDEO_PREVIEWS</string>
|
||||
|
@ -1488,4 +1490,6 @@
|
|||
<string name="remember_position">Remember position in timelines</string>
|
||||
<string name="aggregate_notifications">Aggregate notifications</string>
|
||||
<string name="aggregate_notifications_summary">When turning on, the app will collapse related notifications</string>
|
||||
<string name="display_media_notification">Display media in notifications</string>
|
||||
<string name="display_media_notification_summary">Media in notifications for reblogs and favourites will be displayed</string>
|
||||
</resources>
|
||||
|
|
|
@ -20,14 +20,6 @@
|
|||
app:summary="@string/set_timelines_in_a_list"
|
||||
app:title="@string/set_timelines_in_a_list_title" />
|
||||
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="@string/SET_AGGREGATE_NOTIFICATION"
|
||||
app:singleLineTitle="false"
|
||||
app:summary="@string/aggregate_notifications_summary"
|
||||
app:title="@string/aggregate_notifications" />
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
|
|
|
@ -31,6 +31,23 @@
|
|||
app:key="@string/SET_DISPLAY_BOOKMARK"
|
||||
app:singleLineTitle="false"
|
||||
app:title="@string/set_display_bookmark_indication" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="@string/SET_AGGREGATE_NOTIFICATION"
|
||||
app:singleLineTitle="false"
|
||||
app:summary="@string/aggregate_notifications_summary"
|
||||
app:title="@string/aggregate_notifications" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="@string/SET_DISPLAY_MEDIA_NOTIFICATION"
|
||||
app:singleLineTitle="false"
|
||||
app:summary="@string/display_media_notification_summary"
|
||||
app:title="@string/display_media_notification" />
|
||||
|
||||
<ListPreference
|
||||
app:defaultValue="ALWAYS"
|
||||
app:dialogTitle="@string/load_media_type_title"
|
||||
|
|
Loading…
Reference in a new issue