fix #29 - Allow to display bookmark button on each toot

pull/40/head
Thomas 3 years ago
parent cf9ecb9adf
commit 9d11ccc382

@ -173,6 +173,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
boolean confirmFav = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION_FAV), false);
boolean confirmBoost = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION), true);
boolean fullAttachement = sharedpreferences.getBoolean(context.getString(R.string.SET_FULL_PREVIEW), false);
boolean displayBookmark = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_BOOKMARK), false);
int truncate_toots_size = sharedpreferences.getInt(context.getString(R.string.SET_TRUNCATE_TOOTS_SIZE), 0);
boolean display_video_preview = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_VIDEO_PREVIEWS), true);
boolean isModerator = sharedpreferences.getBoolean(Helper.PREF_IS_MODERATOR, false);
@ -316,7 +318,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
} else {
holder.binding.actionButtons.setVisibility(View.VISIBLE);
//Hide or display bookmark button when status is focused
if (status.isFocused) {
if (status.isFocused || displayBookmark) {
holder.binding.actionButtonBookmark.setVisibility(View.VISIBLE);
} else {
holder.binding.actionButtonBookmark.setVisibility(View.GONE);

@ -1507,6 +1507,7 @@
<string name="SET_FILTER_REGEX_LOCAL" translatable="false">SET_FILTER_REGEX_LOCAL</string>
<string name="SET_FILTER_REGEX_PUBLIC" translatable="false">SET_FILTER_REGEX_PUBLIC</string>
<string name="SET_NOTIF_VALIDATION" translatable="false">SET_NOTIF_VALIDATION</string>
<string name="SET_DISPLAY_BOOKMARK" translatable="false">SET_DISPLAY_BOOKMARK</string>
<string name="SET_NOTIF_VALIDATION_FAV" translatable="false">SET_NOTIF_VALIDATION_FAV</string>
<string name="SET_WIFI_ONLY" translatable="false">SET_WIFI_ONLY</string>
<string name="SET_NOTIF_SILENT" translatable="false">SET_NOTIF_SILENT</string>
@ -1590,6 +1591,7 @@
<string name="message_has_been_sent">Message has been sent!</string>
<string name="poll_type">Poll type:</string>
<string name="poll_duration">Poll duration:</string>
<string name="set_display_bookmark_indication">Always display bookmark button</string>
</resources>

@ -16,6 +16,11 @@
android:defaultValue="true"
app:key="@string/SET_NOTIF_VALIDATION"
app:title="@string/set_share_validation" />
<androidx.preference.SwitchPreference
android:defaultValue="false"
app:iconSpaceReserved="false"
app:key="@string/SET_DISPLAY_BOOKMARK"
app:title="@string/set_display_bookmark_indication" />
<androidx.preference.SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="false"

Loading…
Cancel
Save