diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 30a4c4b309..8a93c8ace3 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -1282,12 +1282,14 @@ public class AdapterMessage extends PagedListAdapter onLoad(Context context, Bundle args) { DB db = DB.getInstance(context); + EntityMessage message = db.message().getMessage(args.getLong("id")); + List folders = db.folder().getFolders(message.account); List targets = new ArrayList<>(); - for (EntityFolder f : folders) - if (!f.id.equals(message.folder)) - targets.add(f); + for (EntityFolder folder : folders) + if (!folder.hide && !folder.id.equals(message.folder)) + targets.add(folder); EntityFolder.sort(targets); diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 97303ed657..915748ca33 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -698,7 +698,8 @@ public class FragmentMessages extends FragmentEx { List targets = new ArrayList<>(); for (EntityFolder folder : folders) - if (fid < 0 ? !folder.unified : !folder.id.equals(fid)) + if (!folder.hide && + (fid < 0 ? !folder.unified : !folder.id.equals(fid))) targets.add(folder); EntityFolder.sort(targets);