Skip to content

Commit

Permalink
simplify registration of manager in server container
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Oct 31, 2017
1 parent 4b24dea commit bcfac75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apps/comments/js/commentstabview.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@
var $li = $(li);
$li.find('.avatar').avatar(undefined, 32);
return $li;
}
},
sorter: function (q, items) { return items; }
},
displayTpl: '<li>'
+ '<span class="avatar-name-wrapper">'
Expand Down
8 changes: 3 additions & 5 deletions lib/private/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@

use OCP\App\IAppManager;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Collaboration\AutoComplete\IManager;
use OCP\Defaults;
use OCA\Theming\Util;
use OCP\Federation\ICloudIdManager;
Expand Down Expand Up @@ -1011,10 +1012,7 @@ public function __construct($webRoot, \OC\Config $config) {
});
$this->registerAlias('CollaboratorSearch', \OCP\Collaboration\Collaborators\ISearch::class);

$this->registerService(\OCP\Collaboration\AutoComplete\IManager::class, function (Server $c) {
return new Collaboration\AutoComplete\Manager($c);
});
$this->registerAlias('AutoCompleteManager', \OCP\Collaboration\AutoComplete\IManager::class);
$this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class);

$this->registerService('SettingsManager', function (Server $c) {
$manager = new \OC\Settings\Manager(
Expand Down Expand Up @@ -1810,7 +1808,7 @@ public function getCollaboratorSearch() {
* @return \OCP\Collaboration\AutoComplete\IManager
*/
public function getAutoCompleteManager(){
return $this->query('AutoCompleteManager');
return $this->query(IManager::class);
}

/**
Expand Down

0 comments on commit bcfac75

Please sign in to comment.