diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index aa75c589f..f0bcb47da 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -1,6 +1,7 @@ package com.keylesspalace.tusky.adapter; import android.content.Context; +import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.preference.PreferenceManager; import android.support.annotation.DrawableRes; @@ -225,8 +226,9 @@ class StatusBaseViewHolder extends RecyclerView.ViewHolder { }); } } - - if (sensitive) { + SharedPreferences pm = PreferenceManager.getDefaultSharedPreferences(context); + Boolean isAlwayShowSensitive = pm.getBoolean("alwayShowSensitiveMedia",false); + if (sensitive && (!isAlwayShowSensitive)) { sensitiveMediaWarning.setVisibility(showingSensitive ? View.GONE : View.VISIBLE); sensitiveMediaWarning.setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java index 103f7e81d..723fa0ef8 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java @@ -270,7 +270,6 @@ public class TimelineFragment extends SFragment implements if (status.reblog != null) { status.reblog.reblogged = reblog; } - StatusViewData newViewData = new StatusViewData.Builder(statuses.getPairedItem(position)) .setReblogged(reblog) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0b5a373ba..c58869c8b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -217,6 +217,7 @@ %ds Follows you + Always show all nsfw content diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 4d618c617..ab655157f 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -19,6 +19,11 @@ android:title="@string/pref_title_show_media_preview" android:defaultValue="true" /> + +