mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Move single messages in single message mode
This commit is contained in:
parent
3bf1f2b2e5
commit
5e6692f972
2 changed files with 5 additions and 4 deletions
|
@ -163,8 +163,9 @@ public interface DaoMessage {
|
|||
" FROM message" +
|
||||
" WHERE account = :account" +
|
||||
" AND thread = :thread" +
|
||||
" AND (:id IS NULL OR message.id = :id)" +
|
||||
" AND ui_found = :found")
|
||||
List<EntityMessage> getMessageByThread(long account, String thread, boolean found);
|
||||
List<EntityMessage> getMessageByThread(long account, String thread, Long id, boolean found);
|
||||
|
||||
@Query("SELECT message.* FROM message" +
|
||||
" JOIN folder ON folder.id = message.folder" +
|
||||
|
|
|
@ -486,7 +486,7 @@ public class FragmentMessages extends FragmentEx {
|
|||
|
||||
if (thread) {
|
||||
List<EntityMessage> messages = db.message().getMessageByThread(
|
||||
message.account, message.thread, message.ui_found);
|
||||
message.account, message.thread, threading ? null : id, message.ui_found);
|
||||
for (EntityMessage threaded : messages) {
|
||||
if (!threaded.ui_hide && threaded.folder.equals(message.folder))
|
||||
result.ids.add(threaded.id);
|
||||
|
@ -751,7 +751,7 @@ public class FragmentMessages extends FragmentEx {
|
|||
for (long id : ids) {
|
||||
EntityMessage message = db.message().getMessage(id);
|
||||
List<EntityMessage> messages = db.message().getMessageByThread(
|
||||
message.account, message.thread, message.ui_found);
|
||||
message.account, message.thread, threading ? null : id, message.ui_found);
|
||||
for (EntityMessage threaded : messages)
|
||||
if (threaded.folder.equals(message.folder)) {
|
||||
result.ids.add(threaded.id);
|
||||
|
@ -1469,7 +1469,7 @@ public class FragmentMessages extends FragmentEx {
|
|||
|
||||
result.target = db.folder().getFolderByType(account, folderType);
|
||||
|
||||
List<EntityMessage> messages = db.message().getMessageByThread(account, thread, found);
|
||||
List<EntityMessage> messages = db.message().getMessageByThread(account, thread, threading ? null : id, found);
|
||||
for (EntityMessage message : messages)
|
||||
if (message.uid != null && !result.target.id.equals(message.folder)) {
|
||||
result.ids.add(message.id);
|
||||
|
|
Loading…
Reference in a new issue