folder: Implement helper function getmessagecount()
Rather than always having to call len(getmessagelist.keys()) as was done before. No functional change, just nicer looking code. Also the SQLite backend or other backends could implement more efficient implementations. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
		
				
					committed by
					
						
						Nicolas Sebrecht
					
				
			
			
				
	
			
			
			
						parent
						
							5048d16913
						
					
				
				
					commit
					4d352a528a
				
			@@ -139,6 +139,10 @@ class BaseFolder:
 | 
			
		||||
        You must call cachemessagelist() before calling this function!"""
 | 
			
		||||
        raise NotImplementedException
 | 
			
		||||
 | 
			
		||||
    def getmessagecount(self):
 | 
			
		||||
        """Gets the number of messages."""
 | 
			
		||||
        return len(self.getmessagelist())
 | 
			
		||||
 | 
			
		||||
    def getmessage(self, uid):
 | 
			
		||||
        """Returns the content of the specified message."""
 | 
			
		||||
        raise NotImplementedException
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user