|
30 | 30 | use OCA\Talk\Room; |
31 | 31 | use OCP\Comments\IComment; |
32 | 32 | use OCP\Dashboard\IAPIWidget; |
| 33 | +use OCP\Dashboard\IIconWidget; |
33 | 34 | use OCP\Dashboard\Model\WidgetItem; |
34 | 35 | use OCP\IL10N; |
35 | 36 | use OCP\IURLGenerator; |
36 | 37 | use OCP\Util; |
37 | 38 |
|
38 | | -class TalkWidget implements IAPIWidget { |
| 39 | +class TalkWidget implements IAPIWidget, IIconWidget { |
39 | 40 | private IURLGenerator $url; |
40 | 41 | private IL10N $l10n; |
41 | 42 | private Manager $manager; |
@@ -81,6 +82,13 @@ public function getIconClass(): string { |
81 | 82 | return 'dashboard-talk-icon'; |
82 | 83 | } |
83 | 84 |
|
| 85 | + /** |
| 86 | + * @inheritDoc |
| 87 | + */ |
| 88 | + public function getIconUrl(): string { |
| 89 | + return $this->url->getAbsoluteURL($this->url->imagePath('spreed', 'app-dark.svg')); |
| 90 | + } |
| 91 | + |
84 | 92 | /** |
85 | 93 | * @inheritDoc |
86 | 94 | */ |
@@ -145,11 +153,11 @@ protected function prepareRoom(Room $room, string $userId): WidgetItem { |
145 | 153 | $room->getDisplayName($userId), |
146 | 154 | $subtitle, |
147 | 155 | $this->url->linkToRouteAbsolute('spreed.Page.showCall', ['token' => $room->getToken()]), |
148 | | - $this->getIconUrl($room, $userId) |
| 156 | + $this->getRoomIconUrl($room, $userId) |
149 | 157 | ); |
150 | 158 | } |
151 | 159 |
|
152 | | - protected function getIconUrl(Room $room, string $userId): string { |
| 160 | + protected function getRoomIconUrl(Room $room, string $userId): string { |
153 | 161 | if ($room->getType() === Room::TYPE_ONE_TO_ONE) { |
154 | 162 | $participants = json_decode($room->getName(), true); |
155 | 163 |
|
|
0 commit comments