Skip to content

Commit a4b6c3c

Browse files
committed
fix(appstore): do not offer rating apps not on appstore
Shipped apps are no longer published to the appstore, so it makes no sense to offer rating them. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent fcb956b commit a4b6c3c

4 files changed

Lines changed: 2 additions & 4 deletions

File tree

apps/appstore/lib/Controller/ApiController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ private function getAppsForCategory(string $requestedCategory = ''): array {
478478
'active' => $this->appManager->isEnabledForUser($app['id']),
479479
'needsDownload' => !$existsLocally,
480480
'groups' => $groups,
481-
'fromAppStore' => true,
482481
'appstoreData' => $app,
483482
];
484483
}

apps/appstore/src/actions/actionInteract.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const actionsInteract: AppAction[] = [
1717
inline: false,
1818
label: () => t('appstore', 'Rate the app'),
1919
enabled(app: IAppstoreApp | IAppstoreExApp) {
20-
return !!app.fromAppStore
20+
return !app.shipped
2121
},
2222
href(app: IAppstoreApp | IAppstoreExApp) {
2323
return `https://apps.nextcloud.com/apps/${encodeURIComponent(app.id)}#comments`

apps/appstore/src/apps.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ interface IAppInfoData {
6969
* It is not available for non-appstore apps.
7070
*/
7171
interface IAppstoreMetadata {
72-
fromAppStore: true
7372
/** List of appstore release information (e.g. changelog) */
7473
releases: IAppstoreAppRelease[]
7574
/** The overall rating of the app */

apps/appstore/src/components/BadgeAppScore.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { app } = defineProps<{
1515
app: IAppstoreApp | IAppstoreExApp
1616
}>()
1717
18-
const isShown = computed(() => app.ratingNumOverall && app.ratingNumOverall > 5)
18+
const isShown = computed(() => !app.shipped && app.ratingNumOverall && app.ratingNumOverall > 5)
1919
const score = computed(() => app.ratingOverall ?? 4)
2020
2121
const title = computed(() => {

0 commit comments

Comments
 (0)