From 44f21222988d233ecef540a3f0777c987d6cd9c1 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 22 Aug 2019 11:35:17 +0200 Subject: [PATCH 1/4] MOBILE-3068 analytics: Don't call logEvent if user disabled --- .../providers/pushnotifications.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/core/pushnotifications/providers/pushnotifications.ts b/src/core/pushnotifications/providers/pushnotifications.ts index 17fe16bb5..0985c6b18 100644 --- a/src/core/pushnotifications/providers/pushnotifications.ts +++ b/src/core/pushnotifications/providers/pushnotifications.ts @@ -342,11 +342,17 @@ export class CorePushNotificationsProvider { const win = window; // This feature is only present in our fork of the plugin. if (CoreConfigConstants.enableanalytics && win.PushNotification && win.PushNotification.logEvent) { - return new Promise((resolve, reject): void => { - win.PushNotification.logEvent(resolve, (error) => { - this.logger.error('Error logging firebase event', name, error); - resolve(); - }, name, data, !!filter); + + // Check if the analytics is enabled by the user. + return this.configProvider.get(CoreConstants.SETTINGS_ANALYTICS_ENABLED, true).then((enabled) => { + if (enabled) { + return new Promise((resolve, reject): void => { + win.PushNotification.logEvent(resolve, (error) => { + this.logger.error('Error logging firebase event', name, error); + resolve(); + }, name, data, !!filter); + }); + } }); } From adf30321f8000f69afec8c0a630ea7dbc141d809 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 22 Aug 2019 13:06:07 +0200 Subject: [PATCH 2/4] MOBILE-3068 login: Fix check WS enabled in 3.1 with local_mobile --- src/providers/sites.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/providers/sites.ts b/src/providers/sites.ts index 9588a3e60..d97901828 100644 --- a/src/providers/sites.ts +++ b/src/providers/sites.ts @@ -492,6 +492,9 @@ export class CoreSitesProvider { } return data; + }, (error) => { + // Local mobile check returned an error. This only happens if the plugin is installed and it returns an error. + return rejectWithCriticalError(error); }).then((data) => { siteUrl = temporarySite.getURL(); From aa9e52d0f298d2216ce34642bb1472117830da13 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 22 Aug 2019 16:40:55 +0200 Subject: [PATCH 3/4] MOBILE-3068 login: Fix no component factory found for CoreLoginSitesPage --- src/core/login/login.module.ts | 2 ++ src/core/login/pages/sites/sites.module.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/core/login/login.module.ts b/src/core/login/login.module.ts index 55d40cff9..cb1a902ec 100644 --- a/src/core/login/login.module.ts +++ b/src/core/login/login.module.ts @@ -14,6 +14,7 @@ import { NgModule } from '@angular/core'; import { CoreLoginHelperProvider } from './providers/helper'; +import { CoreLoginSitesPageModule } from './pages/sites/sites.module'; // List of providers. export const CORE_LOGIN_PROVIDERS = [ @@ -24,6 +25,7 @@ export const CORE_LOGIN_PROVIDERS = [ declarations: [ ], imports: [ + CoreLoginSitesPageModule ], providers: CORE_LOGIN_PROVIDERS }) diff --git a/src/core/login/pages/sites/sites.module.ts b/src/core/login/pages/sites/sites.module.ts index 72b515f38..7913b8d6d 100644 --- a/src/core/login/pages/sites/sites.module.ts +++ b/src/core/login/pages/sites/sites.module.ts @@ -27,5 +27,8 @@ import { CoreDirectivesModule } from '@directives/directives.module'; IonicPageModule.forChild(CoreLoginSitesPage), TranslateModule.forChild() ], + entryComponents: [ + CoreLoginSitesPage + ] }) export class CoreLoginSitesPageModule {} From 4f08571d39c1f980b96154c59f101c3e87c995be Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 23 Aug 2019 09:56:40 +0200 Subject: [PATCH 4/4] MOBILE-3068 ios: Fix styles in messages in iOS --- src/addon/messages/pages/discussion/discussion.scss | 9 ++++++--- .../pages/group-conversations/group-conversations.scss | 2 +- src/app/app.scss | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/addon/messages/pages/discussion/discussion.scss b/src/addon/messages/pages/discussion/discussion.scss index ca1e66232..f17702e24 100644 --- a/src/addon/messages/pages/discussion/discussion.scss +++ b/src/addon/messages/pages/discussion/discussion.scss @@ -5,9 +5,6 @@ $item-message-note-font-size: 75% !default; $item-message-mine-bg: $gray-light !default; ion-app.app-root page-addon-messages-discussion { - .toolbar-title { - padding: 0; - } ion-content { background-color: $gray-lighter !important; @@ -192,6 +189,8 @@ ion-app.app-root page-addon-messages-discussion { } .toolbar-title { + padding: 0; + img { @include margin-horizontal(null, 6px); } @@ -208,6 +207,10 @@ ion-app.app-root page-addon-messages-discussion { ion-icon { @include margin-horizontal(6px, null); } + + &.toolbar-title-ios { + justify-content: center; + } } } diff --git a/src/addon/messages/pages/group-conversations/group-conversations.scss b/src/addon/messages/pages/group-conversations/group-conversations.scss index 80246e1a2..d4dd9a821 100644 --- a/src/addon/messages/pages/group-conversations/group-conversations.scss +++ b/src/addon/messages/pages/group-conversations/group-conversations.scss @@ -40,6 +40,6 @@ ion-app.app-root .addon-message-discussion { ion-app.app-root .addon-message-discussion { h2 { - margin-top: 6px; + margin-top: 10px; } } \ No newline at end of file diff --git a/src/app/app.scss b/src/app/app.scss index 0b52e8337..1118e0771 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -674,8 +674,8 @@ ion-app.app-root { border-radius: 50%; } - .toolbar-ios { - height: 52px; + .header .toolbar-ios { + height: $toolbar-ios-height; } // Footer with auto height.