diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 63231d724..d05bf1d50 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -36,7 +36,7 @@ void * SearchModel::updateSaveListT() category = "Favourites"; if(showOwn && Client::Ref().GetAuthUser().ID) 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) { @@ -119,6 +119,7 @@ void SearchModel::Update() void ** tempInformation; //vector * tempSaveList; pthread_join(updateSaveListThread, (void**)(&tempInformation)); + resultCount = thResultCount; saveList = *(vector*)tempInformation[0]; delete (vector*)tempInformation[0]; diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index d94ddc5ab..343e2597c 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -25,6 +25,7 @@ private: vector > tagList; int currentPage; int resultCount; + int thResultCount; bool showOwn; bool showFavourite; bool showTags;