Correct offset

This commit is contained in:
Emilio Blanco 2011-04-05 14:27:29 -03:00
parent f2388c1fd4
commit a08fc5d5df

View file

@ -460,9 +460,9 @@ class IMAPFolder
} }
end end
def messages(offset = 1, limit = 10, sort = 'date desc') def messages(offset = 0, limit = 10, sort = 'date desc')
# Synchronize first retrieval time # Synchronize first retrieval time
synchronize_cache(offset, limit) #unless @mcached synchronize_cache(offset+1, limit) #unless @mcached
if limit == -1 if limit == -1
@messages = ImapMessage.find(:all, :conditions => ["username = ? and folder_name = ?", @username, @name], :order => sort) @messages = ImapMessage.find(:all, :conditions => ["username = ? and folder_name = ?", @username, @name], :order => sort)