Revert "Hide muted users' statuses in timelines on client side, because we're getting full timeline now(to support muted conversations)"
This reverts commit 2fc5f876bc
.
This commit is contained in:
parent
40c72f1b72
commit
d37e3ec569
@ -155,14 +155,6 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
||||
bindViewHolder(viewHolder, position, payloads);
|
||||
}
|
||||
|
||||
private void fixupHiddenUsers(StatusViewData.Concrete status, View v) {
|
||||
if(status.isUserMuted()) {
|
||||
v.setVisibility(View.GONE);
|
||||
} else {
|
||||
v.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void bindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position, @Nullable List payloads) {
|
||||
Object payloadForHolder = payloads != null && !payloads.isEmpty() ? payloads.get(0) : null;
|
||||
if (position < this.dataSource.getItemCount()) {
|
||||
@ -188,7 +180,6 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
||||
} else {
|
||||
holder.hideStatusInfo();
|
||||
}
|
||||
fixupHiddenUsers(status, holder.itemView);
|
||||
break;
|
||||
}
|
||||
case VIEW_TYPE_MUTED_STATUS: {
|
||||
@ -196,7 +187,6 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
||||
StatusViewData.Concrete status = concreteNotificaton.getStatusViewData();
|
||||
holder.setupWithStatus(status,
|
||||
statusListener, statusDisplayOptions, payloadForHolder);
|
||||
fixupHiddenUsers(status, holder.itemView);
|
||||
break;
|
||||
}
|
||||
case VIEW_TYPE_STATUS_NOTIFICATION: {
|
||||
|
@ -127,7 +127,7 @@ data class Status(
|
||||
}
|
||||
|
||||
fun isUserMuted(): Boolean {
|
||||
return muted
|
||||
return muted && !isThreadMuted()
|
||||
}
|
||||
|
||||
fun isThreadMuted(): Boolean {
|
||||
|
@ -152,7 +152,6 @@ public class TimelineFragment extends SFragment implements
|
||||
private EndlessOnScrollListener scrollListener;
|
||||
private boolean filterRemoveReplies;
|
||||
private boolean filterRemoveReblogs;
|
||||
private boolean filterRemoveMutedUsers;
|
||||
private boolean hideFab;
|
||||
private boolean bottomLoading;
|
||||
|
||||
@ -353,11 +352,6 @@ public class TimelineFragment extends SFragment implements
|
||||
|
||||
filter = preferences.getBoolean("tabFilterHomeBoosts", true);
|
||||
filterRemoveReblogs = kind == Kind.HOME && !filter;
|
||||
|
||||
filterRemoveMutedUsers = kind != Kind.USER &&
|
||||
kind != Kind.USER_PINNED &&
|
||||
kind != Kind.USER_WITH_REPLIES &&
|
||||
kind != Kind.BOOKMARKS;
|
||||
reloadFilters(false);
|
||||
}
|
||||
|
||||
@ -1175,9 +1169,8 @@ public class TimelineFragment extends SFragment implements
|
||||
while (it.hasNext()) {
|
||||
Status status = it.next().asRightOrNull();
|
||||
if (status != null
|
||||
&& ((filterRemoveReplies && status.getInReplyToId() != null)
|
||||
|| (filterRemoveReblogs && status.getReblog() != null)
|
||||
|| (filterRemoveMutedUsers && status.isUserMuted())
|
||||
&& ((status.getInReplyToId() != null && filterRemoveReplies)
|
||||
|| (status.getReblog() != null && filterRemoveReblogs)
|
||||
|| shouldFilterStatus(status))) {
|
||||
it.remove();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user