Fixed crash

This commit is contained in:
M66B 2019-05-15 10:46:59 +02:00
parent f3cf009a9f
commit 0b12570133
1 changed files with 6 additions and 5 deletions

View File

@ -1425,16 +1425,17 @@ public class FragmentAccount extends FragmentBase {
vwColor.setBackground(border);
}
private void setFolders(List<EntityFolder> folders, EntityAccount account) {
private void setFolders(List<EntityFolder> _folders, EntityAccount account) {
List<EntityFolder> folders = new ArrayList<>();
for (EntityFolder folder : _folders)
if (!EntityFolder.INBOX.equals(folder.type))
folders.add(folder);
EntityFolder none = new EntityFolder();
none.id = -1L;
none.name = "-";
folders.add(0, none);
for (EntityFolder folder : new ArrayList<>(folders))
if (EntityFolder.INBOX.equals(folder.type))
folders.remove(folder);
adapter.addAll(folders);
Long left = (account == null ? null : account.swipe_left);