Fix crash with bookmarks
This commit is contained in:
parent
b7c97e2a37
commit
2624e8c7ac
|
@ -367,10 +367,14 @@ public class RetrieveFeedsAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||||
apiResponse = new APIResponse();
|
apiResponse = new APIResponse();
|
||||||
db = Sqlite.getInstance(contextReference.get().getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
db = Sqlite.getInstance(contextReference.get().getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||||
List<app.fedilab.android.client.Entities.Status> statuses = new StatusCacheDAO(contextReference.get(), db).getAllStatus(StatusCacheDAO.BOOKMARK_CACHE);
|
List<app.fedilab.android.client.Entities.Status> statuses = new StatusCacheDAO(contextReference.get(), db).getAllStatus(StatusCacheDAO.BOOKMARK_CACHE);
|
||||||
for (app.fedilab.android.client.Entities.Status status : statuses) {
|
if( statuses != null ) {
|
||||||
app.fedilab.android.client.Entities.Status.fillSpan(contextReference.get(), status);
|
for (app.fedilab.android.client.Entities.Status status : statuses) {
|
||||||
app.fedilab.android.client.Entities.Status.makeEmojiPoll(contextReference.get(), status.getReblog() != null ? status.getReblog().getPoll() : status.getPoll());
|
app.fedilab.android.client.Entities.Status.fillSpan(contextReference.get(), status);
|
||||||
Account.makeAccountNameEmoji(contextReference.get(), status.getReblog() != null ? status.getReblog().getAccount() : status.getAccount());
|
app.fedilab.android.client.Entities.Status.makeEmojiPoll(contextReference.get(), status.getReblog() != null ? status.getReblog().getPoll() : status.getPoll());
|
||||||
|
Account.makeAccountNameEmoji(contextReference.get(), status.getReblog() != null ? status.getReblog().getAccount() : status.getAccount());
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
statuses = new ArrayList<>();
|
||||||
}
|
}
|
||||||
apiResponse.setStatuses(statuses);
|
apiResponse.setStatuses(statuses);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue