-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch next window? #50
Comments
Could you please explain a bit more about what you're trying to achieve overall? Why are you trying to load all the messages into memory? And are you trying to load just those directly referenced by the query, or also the other messages in the same conversations as messages in the query? |
@neilj thanks for your reply. I'm trying to create a sort of "Unified Inbox" where it shows the messsage count for messages in the Inbox with a particular label in the sidebar. So e.g. when I have 8 messages labeled "Project" in my Inbox, it shows "Project (8)" in the sidebar. I'm using this code to create an extra
The 'issue' is that the Inbox isn't always fully loaded, most often only the first 2 windows (60 messages) are loaded. I've found this hack as a workaround (which obviously only works if the Inbox is visible):
(btw - I noticed that this hack is actually botching up a few things, including the undo functionality...) As you can see it's all quite hackish, but I'm pleased that at least this is possible at all because OvertureJS / Fastmail is built in a way I can actually follow (somewhat) what's going on. But I haven't cracked what is needed to load extra windows in a Thanks in advance for any pointers in the right direction! I'm probably going this wrong way round, but happy to learn any pointers how to do this! |
That's a non-trivial thing to do properly to be honest. I would probably start with something like this:
… but I don't think we expose the Anyway, interesting idea, but I'm afraid I don't have time to help you further with it. One last thought though, I think if you get the message list ( |
@neilj thanks for building this in public! Overture is great for those (like me) who like to be able to tinker with Fastmail (e.g. help building Fastmate).
I'm trying to build a function that mimicks the scrolling of a
MesageList
(without the need for a physical scroll) so that everything in aWindowedQuery
gets loaded. E.g. when in Fastmail I have 60 items initially loaded, so I thought that doingFastMail.router.getAppController('mail').mailboxMessageList().getObjectAt(60);
would figure out how to load the 61th object by querying the source. But I can't figure out what the right way is to load the_storeKeys
beyond the initial 60. Would you have any suggestions on how to achieve this (e.g. based on the Fastmail exampel)The text was updated successfully, but these errors were encountered: