'Returns True if the Maildir has changed
Assumes cachemessagelist() has already been called'

def quickchanged(self, statusfolder):

    if (sorted(self.getmessageuidlist()) != sorted(statusfolder.getmessageuidlist())):
        return True
    for (uid, message) in self.getmessagelist().items():
        if (message['flags'] != statusfolder.getmessageflags(uid)):
            return True
    return False
