Add CLEAR and FILTER buttons to notifications (#1168)
* Issue tuskyapp#762 add clear notifications button to the top of the Notifications adapter * Issue tuskyapp#764 add the notifications filter * Update notifications top bar buttons * Replace PopupMenu with PopupWindow. Save notifications filter to the account table * Disable hide top bar on empty content at the notification screen * Add app bar behavior to the sw640 notification layout * Fix issue with click on top notification tab
This commit is contained in:
parent
01234bb94b
commit
63e4c1d4e0
15 changed files with 1247 additions and 28 deletions
|
|
@ -99,24 +99,25 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
|||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
||||
switch (viewType) {
|
||||
case VIEW_TYPE_MENTION: {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
View view = inflater
|
||||
.inflate(R.layout.item_status, parent, false);
|
||||
return new StatusViewHolder(view, useAbsoluteTime);
|
||||
}
|
||||
case VIEW_TYPE_STATUS_NOTIFICATION: {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
View view = inflater
|
||||
.inflate(R.layout.item_status_notification, parent, false);
|
||||
return new StatusNotificationViewHolder(view, useAbsoluteTime);
|
||||
}
|
||||
case VIEW_TYPE_FOLLOW: {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
View view = inflater
|
||||
.inflate(R.layout.item_follow, parent, false);
|
||||
return new FollowViewHolder(view);
|
||||
}
|
||||
case VIEW_TYPE_PLACEHOLDER: {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
View view = inflater
|
||||
.inflate(R.layout.item_status_placeholder, parent, false);
|
||||
return new PlaceholderViewHolder(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue