File tree 2 files changed +4
-17
lines changed 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change 19
19
<repository >https://github.com/nextcloud/ocs_api_viewer.git</repository >
20
20
<screenshot >https://raw.githubusercontent.com/nextcloud/ocs_api_viewer/main/docs/screenshot.png</screenshot >
21
21
<dependencies >
22
- <nextcloud min-version =" 26 " max-version =" 30" />
22
+ <nextcloud min-version =" 29 " max-version =" 30" />
23
23
</dependencies >
24
24
<navigations >
25
25
<navigation >
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ public function findSupported(): array {
51
51
'version ' => $ appInfo ['version ' ],
52
52
'always_enabled ' => in_array ($ app , $ always ),
53
53
];
54
- $ preview = $ this ->getPreview ($ app, $ baseDir );
55
- if ($ preview !== null ) {
56
- $ apiInfo ['icon_url ' ] = $ preview ;
54
+ $ iconUrl = $ this ->appManager -> getAppIcon ($ app );
55
+ if ($ iconUrl !== null ) {
56
+ $ apiInfo ['icon_url ' ] = $ iconUrl ;
57
57
}
58
58
$ apis [] = $ apiInfo ;
59
59
}
@@ -129,17 +129,4 @@ public function getSpec(string $app): string {
129
129
130
130
return json_encode ($ data );
131
131
}
132
-
133
- private function getPreview (string $ app , string $ appPath ) : ?string {
134
- $ appIcon = $ appPath . '/img/ ' . $ app . '.svg ' ;
135
- if (file_exists ($ appIcon )) {
136
- return $ this ->url ->imagePath ($ app , $ app . '.svg ' );
137
- } else {
138
- $ appIcon = $ appPath . '/img/app.svg ' ;
139
- if (file_exists ($ appIcon )) {
140
- return $ this ->url ->imagePath ($ app , 'app.svg ' );
141
- }
142
- }
143
- return null ;
144
- }
145
132
}
You can’t perform that action at this time.
0 commit comments