diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-12 16:47:01 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-12 16:47:01 (GMT) |
| commit | afe9e061e1d173731d8a5122c397a2caf4fe61ab (patch) | |
| tree | f045221d8718c44b8af516cb58bdb45c3c74114b /src/search/SearchModel.cpp | |
| parent | d25384c36c427d4afd71f87f8282b1a981c4b563 (diff) | |
| download | powder-afe9e061e1d173731d8a5122c397a2caf4fe61ab.zip powder-afe9e061e1d173731d8a5122c397a2caf4fe61ab.tar.gz | |
Better names for sort, allow showing own saves
Diffstat (limited to 'src/search/SearchModel.cpp')
| -rw-r--r-- | src/search/SearchModel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index e40c4b0..4a410c3 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -4,12 +4,14 @@ #include "client/Client.h" SearchModel::SearchModel(): - currentSort("votes"), + currentSort("best"), showOwn(false), loadedSave(NULL), updateSaveListWorking(false), updateSaveListFinished(false), - saveListLoaded(false) + saveListLoaded(false), + currentPage(1), + resultCount(0) { } @@ -20,7 +22,7 @@ void * SearchModel::updateSaveListTHelper(void * obj) void * SearchModel::updateSaveListT() { - vector<Save*> * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort, resultCount); + vector<Save*> * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", showOwn, resultCount); updateSaveListFinished = true; return tempSaveList; } |
