mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-01 04:17:21 +01:00
fixed reply loader
This commit is contained in:
parent
debf562d31
commit
7231503aae
@ -643,7 +643,7 @@ public class Mastodon implements Connection {
|
||||
public Statuses getStatusReplies(long id, long minId, long maxId) throws MastodonException {
|
||||
Statuses statusThreads = getStatuses(ENDPOINT_STATUS + id + "/context", new ArrayList<>(0), minId, maxId);
|
||||
Statuses result = new Statuses();
|
||||
// todo add option to toggle viewing whole thread
|
||||
// fixme pagination broken
|
||||
for (Status status : statusThreads) {
|
||||
if (status != null && (minId == 0L || status.getId() > minId) && (maxId == 0L || status.getId() < maxId)) {
|
||||
result.add(status);
|
||||
@ -1520,7 +1520,8 @@ public class Mastodon implements Connection {
|
||||
params.add("limit=" + settings.getListSize());
|
||||
try {
|
||||
Statuses result = createStatuses(get(endpoint, params));
|
||||
if (result.size() > 1)
|
||||
// posts from reply endpoint should not be sorted
|
||||
if (result.size() > 1 && !endpoint.endsWith("/context"))
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
} catch (IOException e) {
|
||||
|
@ -713,7 +713,9 @@ public class AppDatabase {
|
||||
|
||||
SQLiteDatabase db = adapter.getDbRead();
|
||||
Cursor cursor = db.rawQuery(REPLY_QUERY, args);
|
||||
return getStatuses(cursor, db);
|
||||
Statuses result = getStatuses(cursor, db);
|
||||
result.setNextCursor(Statuses.NO_ID);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user