Fixed crash

This commit is contained in:
M66B 2020-05-26 08:05:02 +02:00
parent 853d150836
commit 9f9271b8a8
1 changed files with 2 additions and 26 deletions

View File

@ -4841,32 +4841,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
// Download body when needed
if (!next.content &&
prev.uid == null && next.uid != null && // once only
properties.getValue("expanded", next.id)) {
Bundle args = new Bundle();
args.putLong("id", next.id);
new SimpleTask<Void>() {
@Override
protected Void onExecute(Context context, Bundle args) {
long id = args.getLong("id");
DB db = DB.getInstance(context);
EntityMessage message = db.message().getMessage(id);
if (message == null || message.content)
return null;
EntityOperation.queue(context, message, EntityOperation.BODY);
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
}
}.execute(context, owner, args, "message:body");
}
properties.getValue("expanded", next.id))
EntityOperation.queue(context, next, EntityOperation.BODY);
}
if (!Objects.equals(prev.msgid, next.msgid)) {
// debug info