mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 01:23:38 +02:00
Fix
This commit is contained in:
@@ -793,7 +793,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
bindAttachments(message, attachments);
|
||||
}
|
||||
};
|
||||
liveAttachments = db.attachment().liveAttachments(message.id, true);
|
||||
liveAttachments = db.attachment().liveAttachments(message.id);
|
||||
liveAttachments.observe(owner, observerAttachments);
|
||||
|
||||
// Setup actions
|
||||
|
||||
@@ -30,9 +30,8 @@ import androidx.room.Query;
|
||||
public interface DaoAttachment {
|
||||
@Query("SELECT * FROM attachment" +
|
||||
" WHERE message = :message" +
|
||||
" AND (:inline OR disposition <> 'inline')" +
|
||||
" ORDER BY sequence")
|
||||
LiveData<List<EntityAttachment>> liveAttachments(long message, boolean inline);
|
||||
LiveData<List<EntityAttachment>> liveAttachments(long message);
|
||||
|
||||
@Query("SELECT ifnull(MAX(sequence), 0)" +
|
||||
" FROM attachment" +
|
||||
|
||||
@@ -1808,7 +1808,7 @@ public class FragmentCompose extends FragmentBase {
|
||||
|
||||
DB db = DB.getInstance(getContext());
|
||||
|
||||
db.attachment().liveAttachments(result.draft.id, false).observe(getViewLifecycleOwner(),
|
||||
db.attachment().liveAttachments(result.draft.id).observe(getViewLifecycleOwner(),
|
||||
new Observer<List<EntityAttachment>>() {
|
||||
private int last_available = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user