Permalink
Browse files

Don't make the list of mailboxes a tree

  • Loading branch information...
1 parent c77f652 commit 4e5b7a83afec2e7e372a7011429d8912ef68f58c @aredridel committed Jan 25, 2012
Showing with 1 addition and 17 deletions.
  1. +1 −17 imap.js
View
18 imap.js
@@ -349,25 +349,9 @@ ImapConnection.prototype.connect = function(loginCb) {
return (BOX_ATTRIBS.indexOf(attrib) > -1);
}),
delim: (result[2] === 'NIL'
- ? false : result[2].substring(1, result[2].length-1)),
- children: null,
- parent: null
+ ? false : result[2].substring(1, result[2].length-1))
}, name = result[3], curChildren = self._state.requests[0].args[0];
- if (box.delim) {
- var path = name.split(box.delim).filter(isNotEmpty),
- parent = null;
- name = path.pop();
- for (var i=0,len=path.length; i<len; i++) {
- if (!curChildren[path[i]])
- curChildren[path[i]] = {};
- if (!curChildren[path[i]].children)
- curChildren[path[i]].children = {};
- parent = curChildren[path[i]];
- curChildren = curChildren[path[i]].children;
- }
- box.parent = parent;
- }
curChildren[name] = box;
}
break;

0 comments on commit 4e5b7a8

Please sign in to comment.