if (pns.deleted != null) if (!handleDeletes(pns.deleted)) return;
    public void notifyPendingChanges(PendingModifications pns) {        if (!pns.hasNotifications())            return;        if (pns.deleted != null)            if (!handleDeletes(pns.deleted))                return;        AddedItems added = (mSelectedFolder == null ? null : new AddedItems());        if (pns.created != null)            if (!handleCreates(pns.created, added))                return;        if (pns.modified != null)            if (!handleModifies(pns.modified, added))                return;        // add new messages to the currently selected mailbox        if (added != null && !added.isEmpty()) {            added.sort();            boolean debug = ZimbraLog.imap.isDebugEnabled();            if (!added.numbered.isEmpty()) {                // if messages have acceptable UIDs, just add 'em                StringBuilder addlog = debug ? new StringBuilder("  ** adding messages (ntfn):") : null;                for (ImapMessage i4msg : added.numbered) {                    mSelectedFolder.cache(i4msg);                    if (debug)  addlog.append(' ').append(i4msg.msgId);                    i4msg.setAdded(true);                    mSelectedFolder.dirtyMessage(i4msg);                }                if (debug)  ZimbraLog.imap.debug(addlog);            }            if (!added.unnumbered.isEmpty()) {                // 2.3.1.1: "Unique identifiers are assigned in a strictly ascending fashion in                //           the mailbox; as each message is added to the mailbox it is assigned                //           a higher UID than the message(s) which were added previously."                List<Integer> renumber = new ArrayList<Integer>();                StringBuilder chglog = debug ? new StringBuilder("  ** moved; changing imap uid (ntfn):") : null;                for (ImapMessage i4msg : added.unnumbered) {                    renumber.add(i4msg.msgId);                    if (debug)  chglog.append(' ').append(i4msg.msgId);                }                try {                    if (debug)  ZimbraLog.imap.debug(chglog);                    // notification will take care of adding to mailbox                    getMailbox().resetImapUid(getContext(), renumber);                } catch (ServiceException e) {                    if (debug)  ZimbraLog.imap.debug("  ** moved; imap uid change failed; msg hidden (ntfn): " + renumber);                }            }        }        if (isIdle() && mHandler != null)			try {				mHandler.sendNotifications(true, true);			} catch (IOException e) {                // ImapHandler.dropConnection clears our mHandler and calls SessionCache.clearSession,                //   which calls Session.doCleanup, which calls Mailbox.removeListener                mHandler.dropConnection(false);			}    }