diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/PeertubeAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/PeertubeAdapter.java
index 9d224aa32..01496ebb2 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/PeertubeAdapter.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/PeertubeAdapter.java
@@ -96,6 +96,7 @@ public class PeertubeAdapter extends RecyclerView.Adapter implements OnListActio
peertube.setInstance(Helper.getLiveInstance(context));
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
+ boolean hide_notification_delete = sharedpreferences.getBoolean(Helper.SET_HIDE_DELETE_BUTTON_ON_TAB, false);
if( theme == Helper.THEME_LIGHT){
holder.main_container.setBackgroundResource(R.color.mastodonC3__);
}else if (theme == Helper.THEME_DARK){
@@ -103,7 +104,8 @@ public class PeertubeAdapter extends RecyclerView.Adapter implements OnListActio
}else if (theme == Helper.THEME_BLACK){
holder.main_container.setBackgroundResource(R.color.black);
}
-
+ if(hide_notification_delete)
+ holder.notification_delete.setVisibility(View.GONE);
Account account = peertube.getAccount();
holder.peertube_account_name.setText(account.getAcct());
@@ -207,7 +209,7 @@ public class PeertubeAdapter extends RecyclerView.Adapter implements OnListActio
class ViewHolder extends RecyclerView.ViewHolder{
LinearLayout main_container;
- ImageView peertube_profile, peertube_video_image;
+ ImageView peertube_profile, peertube_video_image, notification_delete;
TextView peertube_account_name, peertube_views, peertube_duration;
TextView peertube_title, peertube_date, header_title;
@@ -222,6 +224,7 @@ public class PeertubeAdapter extends RecyclerView.Adapter implements OnListActio
peertube_duration = itemView.findViewById(R.id.peertube_duration);
main_container = itemView.findViewById(R.id.main_container);
header_title = itemView.findViewById(R.id.header_title);
+ notification_delete = itemView.findViewById(R.id.notification_delete);
}
}
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java
index 5a782868b..e4e8c3fbb 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java
@@ -607,6 +607,24 @@ public class SettingsFragment extends Fragment {
}
});
+ boolean hide_delete_notification_on_tab = sharedpreferences.getBoolean(Helper.SET_HIDE_DELETE_BUTTON_ON_TAB, false);
+ final CheckBox set_hide_delete_notification_on_tab = rootView.findViewById(R.id.set_hide_delete_notification_on_tab);
+ set_old_direct_timeline.setChecked(hide_delete_notification_on_tab);
+
+ set_old_direct_timeline.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ SharedPreferences.Editor editor = sharedpreferences.edit();
+ editor.putBoolean(Helper.SET_HIDE_DELETE_BUTTON_ON_TAB, set_hide_delete_notification_on_tab.isChecked());
+ editor.apply();
+ if( getActivity() != null)
+ getActivity().recreate();
+ Intent intent = new Intent(context, MainActivity.class);
+ if(getActivity() != null)
+ getActivity().finish();
+ startActivity(intent);
+ }
+ });
int truncate_toots_size = sharedpreferences.getInt(Helper.SET_TRUNCATE_TOOTS_SIZE, 0);
SeekBar set_truncate_size = rootView.findViewById(R.id.set_truncate_size);
set_truncate_size.setMax(20);
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java
index 8d496f5b1..6b7bbc644 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java
@@ -307,6 +307,7 @@ public class Helper {
public static final String SET_DISPLAY_CONTENT_AFTER_FM = "set_display_content_after_fm";
public static final String SET_FEATURED_TAGS ="set_featured_tags";
public static final String SET_FEATURED_TAG_ACTION ="set_featured_tag_action";
+ public static final String SET_HIDE_DELETE_BUTTON_ON_TAB = "set_hide_delete_notification_on_tab";
public static final int S_NO = 0;
static final int S_512KO = 1;
public static final int S_1MO = 2;
diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml
index b448e6fce..18269a6e1 100644
--- a/app/src/main/res/layout/fragment_settings.xml
+++ b/app/src/main/res/layout/fragment_settings.xml
@@ -139,6 +139,14 @@
android:text="@string/set_old_direct_timeline"
android:layout_height="wrap_content" />
+
+
Featured hashtags
Filter timeline with tags
No tags
+ Hide delete notifcation button on notification tab