add hide notification delete button
This commit is contained in:
parent
349cd9be31
commit
e054ce1501
|
@ -144,6 +144,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
boolean expand_cw = sharedpreferences.getBoolean(Helper.SET_EXPAND_CW, false);
|
||||
boolean confirmFav = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION_FAV, false);
|
||||
boolean confirmBoost = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION, true);
|
||||
boolean hide_notification_delete = sharedpreferences.getBoolean(Helper.SET_HIDE_DELETE_BUTTON_ON_TAB, false);
|
||||
|
||||
if (theme == THEME_DARK ){
|
||||
holder.main_container_trans.setBackgroundColor(ContextCompat.getColor(context, R.color.notif_dark_1));
|
||||
|
@ -162,6 +163,9 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
}else {
|
||||
style = R.style.Dialog;
|
||||
}
|
||||
|
||||
if(hide_notification_delete)
|
||||
holder.notification_delete.setVisibility(View.GONE);
|
||||
Drawable imgH = null;
|
||||
holder.status_date.setVisibility(View.VISIBLE);
|
||||
switch (type){
|
||||
|
|
|
@ -96,7 +96,6 @@ 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){
|
||||
|
@ -104,8 +103,6 @@ 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());
|
||||
|
@ -209,7 +206,7 @@ public class PeertubeAdapter extends RecyclerView.Adapter implements OnListActio
|
|||
|
||||
class ViewHolder extends RecyclerView.ViewHolder{
|
||||
LinearLayout main_container;
|
||||
ImageView peertube_profile, peertube_video_image, notification_delete;
|
||||
ImageView peertube_profile, peertube_video_image;
|
||||
TextView peertube_account_name, peertube_views, peertube_duration;
|
||||
TextView peertube_title, peertube_date, header_title;
|
||||
|
||||
|
@ -224,7 +221,6 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -609,9 +609,9 @@ 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_hide_delete_notification_on_tab.setChecked(hide_delete_notification_on_tab);
|
||||
|
||||
set_old_direct_timeline.setOnClickListener(new View.OnClickListener() {
|
||||
set_hide_delete_notification_on_tab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||
|
|
Loading…
Reference in New Issue