Prefetch MAM for smoother PageUp
Poezio version: eec8dcc2
Current MAM implementation lacks feedback when fetching older messages. It also happens that these queries take some time to resolve/process, and it can confuse users, making them think the feature is not working.
One way to solve this could be to prefetch messages, i.e., do a normal MAM query just like it is currently done on PageUp, but without scrolling up. And when PageUp is pressed, scroll up to the prefetched messages, and start another prefetch.
This way the feedback is instantaneous (messages appear directly).
Do we want to fill all the buffer when tabs are instantiated? (I would be in favor of this).
We would probably need some kind of prioritization for MAM fetches, that is, load N messages first in all tabs, and then start fetching the rest, first in focused tabs (if there is), and then in others?