From 5313754a25570ec954854959f558187ddb07dffa Mon Sep 17 00:00:00 2001 From: Alfonso Date: Tue, 29 Mar 2022 13:44:28 +0200 Subject: [PATCH] MOBILE-4010 about: show feedback item if there is a selected site --- src/core/features/settings/pages/about/about.html | 2 +- src/core/features/settings/pages/about/about.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/features/settings/pages/about/about.html b/src/core/features/settings/pages/about/about.html index bcab19c6b..98a0e25cb 100644 --- a/src/core/features/settings/pages/about/about.html +++ b/src/core/features/settings/pages/about/about.html @@ -27,7 +27,7 @@ {{ 'core.settings.accessstatement' | translate }} - {{ 'core.settings.helpusimprove' | translate }} diff --git a/src/core/features/settings/pages/about/about.ts b/src/core/features/settings/pages/about/about.ts index 256cf5fe6..3d64b1605 100644 --- a/src/core/features/settings/pages/about/about.ts +++ b/src/core/features/settings/pages/about/about.ts @@ -17,6 +17,7 @@ import { Component } from '@angular/core'; import { CoreConstants } from '@/core/constants'; import { CoreSites } from '@services/sites'; import { CoreNavigator } from '@services/navigator'; +import { CoreSite } from '@classes/site'; /** * App settings about menu page. @@ -33,16 +34,17 @@ export class CoreSettingsAboutPage { privacyPolicy: string; feedbackFormUrl = CoreConstants.CONFIG.feedbackFormUrl ?? 'https://feedback.moodle.org/mobileapp'; a11yStatement = CoreConstants.CONFIG.a11yStatement ?? 'https://apps.moodle.com/admin/tool/policy/view.php?versionid=5'; + currentSite?: CoreSite; constructor() { - const currentSite = CoreSites.getCurrentSite(); + this.currentSite = CoreSites.getCurrentSite(); this.appName = CoreConstants.CONFIG.appname; this.versionName = CoreConstants.CONFIG.versionname; // Calculate the privacy policy to use. - this.privacyPolicy = (currentSite && (currentSite.getStoredConfig('tool_mobile_apppolicy') || - currentSite.getStoredConfig('sitepolicy'))) || CoreConstants.CONFIG.privacypolicy; + this.privacyPolicy = (this.currentSite && (this.currentSite.getStoredConfig('tool_mobile_apppolicy') || + this.currentSite.getStoredConfig('sitepolicy'))) || CoreConstants.CONFIG.privacypolicy; } /**