Fix incorrect search page count

This commit is contained in:
jacksonmj 2013-10-17 00:03:10 +01:00
parent c4dcb37de4
commit 132755525c

View File

@ -61,7 +61,13 @@ public:
vector<SaveInfo*> GetSaveList();
vector<pair<string, int> > GetTagList();
string GetLastError() { return lastError; }
int GetPageCount() { return max(1, (int)(ceil(resultCount/16.0f))); }
int GetPageCount()
{
if (!showOwn && !showFavourite && currentSort == "best" && lastQuery == "")
return max(1, (int)(ceil((resultCount+5)/20.0f)));
else
return max(1, (int)(ceil(resultCount/20.0f)));
}
int GetPageNum() { return currentPage; }
std::string GetLastQuery() { return lastQuery; }
void SetSort(string sort) { if(!updateSaveListWorking) { currentSort = sort; } notifySortChanged(); }