diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-11-09 11:11:41 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-11-09 11:11:41 +0300 |
commit | 80d4fabff1daeeee362f8ac3e83f136435caf6a0 (patch) | |
tree | 2b6d9d444f370ba307c67663aa2aba283ac3c117 /lib/Search | |
parent | 88cccad23d45a11d0687ebea2f8995389d2e660e (diff) |
Always show Mail search results first
If a search request origins from a Mail page, we should show Mail
results on top.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Search')
-rw-r--r-- | lib/Search/Provider.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Search/Provider.php b/lib/Search/Provider.php index 3ce7c3932..6583e69d9 100644 --- a/lib/Search/Provider.php +++ b/lib/Search/Provider.php @@ -71,6 +71,11 @@ class Provider implements IProvider { } public function getOrder(string $route, array $routeParameters): int { + if (strpos($route, Application::APP_ID . '.') === 0) { + // Active app, prefer Mail results + return -1; + } + return 20; } |