Skip to content

Commit

Permalink
Merge pull request #11054 from nextcloud/bugfix/noid/hide-current-con…
Browse files Browse the repository at this point in the history
…versation-search-when-not-on-talk

fix(search): Hide "Messages in current conversation" when not on talk
  • Loading branch information
nickvergessen authored Nov 30, 2023
2 parents 45bd819 + f2fddb6 commit 23cbf28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Search/CurrentMessageSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ public function getName(): string {
/**
* @inheritDoc
*/
public function getOrder(string $route, array $routeParameters): int {
public function getOrder(string $route, array $routeParameters): ?int {
if ($route === 'spreed.Page.showCall') {
// In conversation, prefer this search results
return -3;
}

// We are not returning something anyway.
return 999;
return null;
}

protected function getSublineTemplate(): string {
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/MessageSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function getName(): string {
/**
* @inheritDoc
*/
public function getOrder(string $route, array $routeParameters): int {
public function getOrder(string $route, array $routeParameters): ?int {
if (strpos($route, Application::APP_ID . '.') === 0) {
// Active app, prefer Talk results
return -2;
Expand Down

0 comments on commit 23cbf28

Please sign in to comment.