Add "account" filter context (#1776)

This commit is contained in:
kyori19 2020-05-09 02:17:02 +09:00 committed by GitHub
commit 623eb1fe2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View file

@ -379,6 +379,10 @@ public class TimelineFragment extends SFragment implements
return filterContext.contains(Filter.PUBLIC);
case FAVOURITES:
return (filterContext.contains(Filter.PUBLIC) || filterContext.contains(Filter.NOTIFICATIONS));
case USER:
case USER_WITH_REPLIES:
case USER_PINNED:
return filterContext.contains(Filter.ACCOUNT);
default:
return false;
}
@ -872,7 +876,8 @@ public class TimelineFragment extends SFragment implements
case Filter.HOME:
case Filter.NOTIFICATIONS:
case Filter.THREAD:
case Filter.PUBLIC: {
case Filter.PUBLIC:
case Filter.ACCOUNT: {
if (filterContextMatchesKind(kind, Collections.singletonList(key))) {
reloadFilters(true);
}