diff options
author | Joas Schilling <coding@schilljs.com> | 2019-03-13 20:25:22 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-03-19 13:06:55 +0100 |
commit | 403b673b93b98b7158838c232581ad221aeccd09 (patch) | |
tree | a1ae79fa9ab7d91bf6fb6acc14da81a5b36aef8f /lib | |
parent | ff6f105ea6a37107e7c6e12bcace010490c93c58 (diff) | |
download | nextcloud-server-403b673b93b98b7158838c232581ad221aeccd09.tar.gz nextcloud-server-403b673b93b98b7158838c232581ad221aeccd09.zip |
Replace the icon-class with an absolute link to an image
Otherwise the icon can not be displayed in mobile apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
4 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php index dc4d2fc0265..d1b84f96283 100644 --- a/lib/private/Collaboration/Resources/Manager.php +++ b/lib/private/Collaboration/Resources/Manager.php @@ -309,11 +309,11 @@ class Manager implements IManager { * @param IResource $resource * @return string */ - public function getIconClass(IResource $resource): string { + public function getIconLink(IResource $resource): string { foreach ($this->getProviders() as $provider) { if ($provider->getType() === $resource->getType()) { try { - return $provider->getIconClass($resource); + return $provider->getIconLink($resource); } catch (ResourceException $e) { } } diff --git a/lib/private/Collaboration/Resources/Resource.php b/lib/private/Collaboration/Resources/Resource.php index d9c72ca2039..0a3c003b27c 100644 --- a/lib/private/Collaboration/Resources/Resource.php +++ b/lib/private/Collaboration/Resources/Resource.php @@ -106,9 +106,9 @@ class Resource implements IResource { * @return string * @since 16.0.0 */ - public function getIconClass(): string { + public function getIconLink(): string { if ($this->iconClass === null) { - $this->iconClass = $this->manager->getIconClass($this); + $this->iconClass = $this->manager->getIconLink($this); } return $this->iconClass; diff --git a/lib/public/Collaboration/Resources/IProvider.php b/lib/public/Collaboration/Resources/IProvider.php index 376a816a5cb..16ab16c0d1b 100644 --- a/lib/public/Collaboration/Resources/IProvider.php +++ b/lib/public/Collaboration/Resources/IProvider.php @@ -53,7 +53,7 @@ interface IProvider { * @return string * @since 16.0.0 */ - public function getIconClass(IResource $resource): string; + public function getIconLink(IResource $resource): string; /** * Get the link to a resource diff --git a/lib/public/Collaboration/Resources/IResource.php b/lib/public/Collaboration/Resources/IResource.php index 609a283c2d8..0a3e36a33ce 100644 --- a/lib/public/Collaboration/Resources/IResource.php +++ b/lib/public/Collaboration/Resources/IResource.php @@ -48,10 +48,11 @@ interface IResource { public function getName(): string; /** + * Absolute link to an icon to represent the resource * @return string * @since 16.0.0 */ - public function getIconClass(): string; + public function getIconLink(): string; /** * @return string |