summaryrefslogtreecommitdiff
path: root/src/search/SearchController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/search/SearchController.cpp')
-rw-r--r--src/search/SearchController.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp
index 6fa9748..1449f9a 100644
--- a/src/search/SearchController.cpp
+++ b/src/search/SearchController.cpp
@@ -4,6 +4,7 @@
#include "SearchView.h"
#include "interface/Panel.h"
#include "preview/PreviewController.h"
+#include "client/Client.h"
class SearchController::OpenCallback: public ControllerCallback
{
@@ -106,19 +107,22 @@ void SearchController::NextPage()
void SearchController::ChangeSort()
{
- if(searchModel->GetSort() == "date")
+ if(searchModel->GetSort() == "new")
{
- searchModel->SetSort("votes");
+ searchModel->SetSort("best");
}
else
{
- searchModel->SetSort("date");
+ searchModel->SetSort("new");
}
}
void SearchController::ShowOwn(bool show)
{
- //TODO: Implement
+ if(Client::Ref().GetAuthUser().ID)
+ searchModel->SetShowOwn(show);
+ else
+ searchModel->SetShowOwn(false);
}
void SearchController::OpenSave(int saveID)