Enough-Software / enough_mail

IMAP, POP3 and SMTP clients for Dart developers. Contains both low level as well as a high level API.
Mozilla Public License 2.0
100 stars 56 forks source link

problem with Pagination of maiClient.fetchMessages() #197

Closed Tzanou123 closed 2 years ago

Tzanou123 commented 2 years ago

Hello,

I want to use mailClient.fetchMessages() but i get an obscur behaviour ! It maybe the right one but not really sure

when i use the count parameter it give me count - 1 mail (count:5, give me 4 mail)

and the other page give me the last mail of the previous page

for example with :

mailClient.fetchMessages(
        mailbox: box,
        count: 5,
        page: 1
)

i get this result :

page1 page2
mail1 mail4
mail2 mail5
mail3 mail6
mail4 mail7

but i expect :

page1 page2
mail1 mail6
mail2 mail7
mail3 mail8
mail4 mail9
mail5 mail10

In this situation it is complicate top make a solid structured pagination of email ! So does this behaviour is coming from me or my understanding ? or it is a real bug ?

Thanks by advance

robert-virkus commented 2 years ago

Thanks for your report, can you please check the latest github version? This should be solved now.