From e3b9e9e8f890f973f6f1fc674203d0cb370aa77b Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 18 May 2018 11:41:36 +0200 Subject: [PATCH] MOBILE-2381 settings: Display app policy --- src/core/settings/pages/about/about.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/settings/pages/about/about.ts b/src/core/settings/pages/about/about.ts index 3dd531962..1f2e98651 100644 --- a/src/core/settings/pages/about/about.ts +++ b/src/core/settings/pages/about/about.ts @@ -20,6 +20,7 @@ import { CoreFileProvider } from '@providers/file'; import { CoreInitDelegate } from '@providers/init'; import { CoreLangProvider } from '@providers/lang'; import { CoreLocalNotificationsProvider } from '@providers/local-notifications'; +import { CoreSitesProvider } from '@providers/sites'; import { CoreConfigConstants } from '../../../../configconstants'; /** @@ -52,13 +53,18 @@ export class CoreSettingsAboutPage { localNotifAvailable: string; constructor(platform: Platform, device: Device, appProvider: CoreAppProvider, fileProvider: CoreFileProvider, - initDelegate: CoreInitDelegate, langProvider: CoreLangProvider, + initDelegate: CoreInitDelegate, langProvider: CoreLangProvider, sitesProvider: CoreSitesProvider, localNotificationsProvider: CoreLocalNotificationsProvider) { + const currentSite = sitesProvider.getCurrentSite(); + this.appName = appProvider.isDesktop() ? CoreConfigConstants.desktopappname : CoreConfigConstants.appname; this.versionName = CoreConfigConstants.versionname; this.versionCode = CoreConfigConstants.versioncode; - this.privacyPolicy = CoreConfigConstants.privacypolicy; + + // Calculate the privacy policy to use. + this.privacyPolicy = currentSite.getStoredConfig('tool_mobile_apppolicy') || currentSite.getStoredConfig('sitepolicy') || + CoreConfigConstants.privacypolicy; this.navigator = window.navigator; if (window.location && window.location.href) {