1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Move to shown folders only

This commit is contained in:
M66B 2018-11-24 18:38:34 +01:00
parent 2c4a9ca512
commit cdd34e26f7
2 changed files with 7 additions and 4 deletions

View file

@ -1282,12 +1282,14 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
@Override
protected List<EntityFolder> onLoad(Context context, Bundle args) {
DB db = DB.getInstance(context);
EntityMessage message = db.message().getMessage(args.getLong("id"));
List<EntityFolder> folders = db.folder().getFolders(message.account);
List<EntityFolder> 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);

View file

@ -698,7 +698,8 @@ public class FragmentMessages extends FragmentEx {
List<EntityFolder> 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);