From c3f18c7677c7b98402b6db124c5cf9cec4aa29fb Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 2 Sep 2020 11:14:05 +0200 Subject: [PATCH] MOBILE-3533 messages: Don't show preferences if messaging disabled --- src/addon/messages/providers/settings-handler.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/addon/messages/providers/settings-handler.ts b/src/addon/messages/providers/settings-handler.ts index b3a4b62df..cbee96b44 100644 --- a/src/addon/messages/providers/settings-handler.ts +++ b/src/addon/messages/providers/settings-handler.ts @@ -32,8 +32,10 @@ export class AddonMessagesSettingsHandler implements CoreSettingsHandler { * * @return Whether or not the handler is enabled on a site level. */ - isEnabled(): boolean | Promise { - return this.messagesProvider.isMessagePreferencesEnabled(); + async isEnabled(): Promise { + const messagingEnabled = await this.messagesProvider.isPluginEnabled(); + + return messagingEnabled && this.messagesProvider.isMessagePreferencesEnabled(); } /**