Skip to content

Commit 75eab61

Browse files
fix(search): Hide "Messages in current conversation" when not on talk
Possible since nextcloud/server#41646 Signed-off-by: Joas Schilling <[email protected]>
1 parent b6a5a76 commit 75eab61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Search/CurrentMessageSearch.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ public function getName(): string {
4747
/**
4848
* @inheritDoc
4949
*/
50-
public function getOrder(string $route, array $routeParameters): int {
50+
public function getOrder(string $route, array $routeParameters): ?int {
5151
if ($route === 'spreed.Page.showCall') {
5252
// In conversation, prefer this search results
5353
return -3;
5454
}
5555

5656
// We are not returning something anyway.
57-
return 999;
57+
return null;
5858
}
5959

6060
protected function getSublineTemplate(): string {

lib/Search/MessageSearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getName(): string {
7575
/**
7676
* @inheritDoc
7777
*/
78-
public function getOrder(string $route, array $routeParameters): int {
78+
public function getOrder(string $route, array $routeParameters): ?int {
7979
if (strpos($route, Application::APP_ID . '.') === 0) {
8080
// Active app, prefer Talk results
8181
return -2;

0 commit comments

Comments
 (0)