B2G/gaia/apps/email/js/ext/mailapi/composite/configurator.js
/**
   * Save the account def and folder info for our new (or recreated) account and
   * then load it.
   */
Save the account def and folder info for our new (or recreated) account and
then load it.
Save the account def and folder info for our new ( or recreated ) account and then load it .
function cfg_is__loadAccount(universe, accountDef,
                                             oldFolderInfo, imapProtoConn,
                                             callback) {
    var folderInfo = {
      $meta: {
        nextFolderNum: 0,
        nextMutationNum: 0,
        lastFolderSyncAt: 0,
        capability: (oldFolderInfo && oldFolderInfo.$meta.capability) ||
                    imapProtoConn.capabilities,
        rootDelim: (oldFolderInfo && oldFolderInfo.$meta.rootDelim) ||
                   imapProtoConn.delim,
      },
      $mutations: [],
      $mutationState: {},
    };
    universe.saveAccountDef(accountDef, folderInfo);
    universe._loadAccount(accountDef, folderInfo, imapProtoConn, callback);
  }
function cfg_is__loadAccount ( universe , accountDef , oldFolderInfo , imapProtoConn , callback ) { var folderInfo = { $meta : { nextFolderNum : 0 , nextMutationNum : 0 , lastFolderSyncAt : 0 , capability : ( oldFolderInfo && oldFolderInfo . $meta . capability ) || imapProtoConn . capabilities , rootDelim : ( oldFolderInfo && oldFolderInfo . $meta . rootDelim ) || imapProtoConn . delim , } , $mutations : [ ] , $mutationState : { } , } ; universe . saveAccountDef ( accountDef , folderInfo ) ; universe . _loadAccount ( accountDef , folderInfo , imapProtoConn , callback ) ; }
Save the account def and folder info for our new (or recreated) account and
 then load it.
Save the account def and folder info for our new ( or recreated ) account and then load it .
// XXX: Just reload the old folders when applicable instead of syncing the // folder list again, which is slow.