prepare for big change

This commit is contained in:
Mariotaku Lee 2017-10-07 12:40:37 +08:00
parent 3f5e804145
commit d98c25c453
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
2 changed files with 12 additions and 1 deletions

View File

@ -327,24 +327,31 @@ public class ParcelableStatus implements Parcelable, Comparable<ParcelableStatus
public long inserted_date;
@FilterFlags
@JsonField(name = "filter_flags")
@CursorField(Statuses.FILTER_FLAGS)
public long filter_flags;
@JsonField(name = "filter_users")
@CursorField(value = Statuses.FILTER_USERS, converter = FilterUserKeysFieldConverter.class)
public UserKey[] filter_users;
@JsonField(name = "filter_sources")
@CursorField(value = Statuses.FILTER_SOURCES, converter = FilterStringsFieldConverter.class)
public String[] filter_sources;
@JsonField(name = "filter_links")
@CursorField(value = Statuses.FILTER_LINKS, converter = FilterStringsFieldConverter.class)
public String[] filter_links;
@JsonField(name = "filter_names")
@CursorField(value = Statuses.FILTER_NAMES, converter = FilterStringsFieldConverter.class)
public String[] filter_names;
@JsonField(name = "filter_texts")
@CursorField(value = Statuses.FILTER_TEXTS)
public String filter_texts;
@JsonField(name = "filter_descriptions")
@CursorField(value = Statuses.FILTER_DESCRIPTIONS)
public String filter_descriptions;

View File

@ -118,10 +118,14 @@ abstract class AbsRequestStatusesLoader(
} else {
data.sort()
}
data.forEach { it.is_filtered = shouldFilterStatus(it) }
return ListResponse.getListInstance(data)
}
}
if (!fromUser) return ListResponse.getListInstance(data)
if (!fromUser) {
data.forEach { it.is_filtered = shouldFilterStatus(it) }
return ListResponse.getListInstance(data)
}
val noItemsBefore = data.isEmpty()
val loadItemLimit = preferences[loadItemLimitKey]
val statuses = try {