Fix search providers order and IDs

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2020-08-05 17:56:01 +02:00
parent 55473dd2eb
commit d2c0569b49
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
7 changed files with 12 additions and 11 deletions

View File

@ -83,7 +83,7 @@ class ContactsSearchProvider implements IProvider {
* @inheritDoc
*/
public function getId(): string {
return 'contacts-dav';
return 'contacts';
}
/**
@ -100,7 +100,7 @@ class ContactsSearchProvider implements IProvider {
if ($route === 'contacts.Page.index') {
return -1;
}
return 20;
return 25;
}
/**

View File

@ -69,7 +69,7 @@ class EventsSearchProvider extends ACalendarSearchProvider {
* @inheritDoc
*/
public function getId(): string {
return 'calendar-dav';
return 'calendar';
}
/**
@ -86,7 +86,7 @@ class EventsSearchProvider extends ACalendarSearchProvider {
if ($route === 'calendar.View.index') {
return -1;
}
return 10;
return 30;
}
/**

View File

@ -61,7 +61,7 @@ class TasksSearchProvider extends ACalendarSearchProvider {
* @inheritDoc
*/
public function getId(): string {
return 'tasks-dav';
return 'tasks';
}
/**
@ -78,7 +78,7 @@ class TasksSearchProvider extends ACalendarSearchProvider {
if ($route === 'tasks.Page.index') {
return -1;
}
return 10;
return 35;
}
/**

View File

@ -88,7 +88,7 @@ class ContactsSearchProviderTest extends TestCase {
}
public function testGetId(): void {
$this->assertEquals('contacts-dav', $this->provider->getId());
$this->assertEquals('contacts', $this->provider->getId());
}
public function testGetName(): void {

View File

@ -250,7 +250,7 @@ class EventsSearchProviderTest extends TestCase {
}
public function testGetId(): void {
$this->assertEquals('calendar-dav', $this->provider->getId());
$this->assertEquals('calendar', $this->provider->getId());
}
public function testGetName(): void {

View File

@ -134,7 +134,7 @@ class TasksSearchProviderTest extends TestCase {
}
public function testGetId(): void {
$this->assertEquals('tasks-dav', $this->provider->getId());
$this->assertEquals('tasks', $this->provider->getId());
}
public function testGetName(): void {

View File

@ -62,7 +62,7 @@ class SectionSearch implements IProvider {
* @inheritDoc
*/
public function getId(): string {
return 'settings_sections';
return 'settings';
}
/**
@ -79,7 +79,8 @@ class SectionSearch implements IProvider {
if ($route === 'settings.PersonalSettings.index' || $route === 'settings.AdminSettings.index') {
return -1;
}
return 20;
// At the very bottom
return 500;
}
/**