Prevent page count for being all over the place in search
This commit is contained in:
parent
b06f7f5b6d
commit
66fffe649d
@ -36,7 +36,7 @@ void * SearchModel::updateSaveListT()
|
|||||||
category = "Favourites";
|
category = "Favourites";
|
||||||
if(showOwn && Client::Ref().GetAuthUser().ID)
|
if(showOwn && Client::Ref().GetAuthUser().ID)
|
||||||
category = "by:"+Client::Ref().GetAuthUser().Username;
|
category = "by:"+Client::Ref().GetAuthUser().Username;
|
||||||
information[0] = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", category, resultCount);
|
information[0] = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", category, thResultCount);
|
||||||
|
|
||||||
if(showTags)
|
if(showTags)
|
||||||
{
|
{
|
||||||
@ -119,6 +119,7 @@ void SearchModel::Update()
|
|||||||
void ** tempInformation;
|
void ** tempInformation;
|
||||||
//vector<SaveInfo*> * tempSaveList;
|
//vector<SaveInfo*> * tempSaveList;
|
||||||
pthread_join(updateSaveListThread, (void**)(&tempInformation));
|
pthread_join(updateSaveListThread, (void**)(&tempInformation));
|
||||||
|
resultCount = thResultCount;
|
||||||
saveList = *(vector<SaveInfo*>*)tempInformation[0];
|
saveList = *(vector<SaveInfo*>*)tempInformation[0];
|
||||||
|
|
||||||
delete (vector<SaveInfo*>*)tempInformation[0];
|
delete (vector<SaveInfo*>*)tempInformation[0];
|
||||||
|
@ -25,6 +25,7 @@ private:
|
|||||||
vector<pair<string, int> > tagList;
|
vector<pair<string, int> > tagList;
|
||||||
int currentPage;
|
int currentPage;
|
||||||
int resultCount;
|
int resultCount;
|
||||||
|
int thResultCount;
|
||||||
bool showOwn;
|
bool showOwn;
|
||||||
bool showFavourite;
|
bool showFavourite;
|
||||||
bool showTags;
|
bool showTags;
|
||||||
|
Reference in New Issue
Block a user