Closed XertroV closed 1 year ago
To clarify, option 1 above is basically what I've implemented atm. The changes are minimal:
StartRequest
into a main StartRequest
and a StartRequestForPage(int page)
(this does not Clear
and sets params['page'] = '' + page;
)HandleResponse
: if (m_page + 1 < m_pageCount) StartRequestForPage(m_page + 1);
Render
change the 'loading list..' if condition to if (m_request !is null && m_pageCount == 0)
the new StartRequest
is just:
void StartRequest()
{
Clear();
StartRequestForPage(0);
}
edit: I had to make a few changes to other parts of the code (like the name of the mainmenu etc) so don't want to commit that up and pollute the source tree
Yes, this would be great to have a PR for! Infinite scroll I think makes the most sense to me, as that would be what people expect from other programs.
The first option of requesting all pages immediately would be wasteful when they are not needed. If we were to go this route, then it would be better for the server to just return all items instead of implementing paging at all.
Yes, this would be great to have a PR for! Infinite scroll I think makes the most sense to me, as that would be what people expect from other programs.
Cool, I'll whip something up and post a vid to discord for feedback.
plugin manager doesn't support pages atm. this hasn't been that big of a problem, but it's going to become more of a problem as more plugins are created.
e.g., currently, the featured tab omits better loading screens and menu background chooser b/c they're on the 2nd page.
I see that there is some code for pages already (particularly:
m_total
,m_page
, andm_pageCount
are set inHandleResponse
) and I've manged to implement a simple 'keep-requesting-all-pages-and-append-them-one-at-a-time' feature.@codecat, if you're cool with it, I'm happy to implement support for pages. If so, then I have some questions about UI preferences:
Do you have any prior ideas about the UI/UX around pages?
If not, I have 3 ideas:
Any preference between those 3 or other ideas?