Fix #206 - Home cache not filtered

This commit is contained in:
Thomas 2022-06-29 18:53:39 +02:00
parent 0942e71878
commit 7b3b0a9a0c
1 changed files with 3 additions and 1 deletions

View File

@ -451,8 +451,10 @@ public class TimelinesVM extends AndroidViewModel {
Statuses statuses = null;
try {
statuses = statusCacheDAO.geStatuses(StatusCache.CacheEnum.HOME, instance, user_id, maxId, minId, sinceId);
if (statuses != null) {
statuses.statuses = SpannableHelper.convertStatus(getApplication().getApplicationContext(), statuses.statuses);
List<Status> filteredStatuses = TimelineHelper.filterStatus(getApplication().getApplicationContext(), statuses.statuses, TimelineHelper.FilterTimeLineType.HOME);
statuses.statuses = SpannableHelper.convertStatus(getApplication().getApplicationContext(), filteredStatuses);
if (statuses.statuses != null && statuses.statuses.size() > 0) {
statuses.pagination = new Pagination();
statuses.pagination.min_id = statuses.statuses.get(0).id;