MOBILE-3533 messages: Don't show preferences if messaging disabled

main
Dani Palou 2020-09-02 11:14:05 +02:00
parent bdbba2885e
commit c3f18c7677
1 changed files with 4 additions and 2 deletions

View File

@ -32,8 +32,10 @@ export class AddonMessagesSettingsHandler implements CoreSettingsHandler {
* *
* @return Whether or not the handler is enabled on a site level. * @return Whether or not the handler is enabled on a site level.
*/ */
isEnabled(): boolean | Promise<boolean> { async isEnabled(): Promise<boolean> {
return this.messagesProvider.isMessagePreferencesEnabled(); const messagingEnabled = await this.messagesProvider.isPluginEnabled();
return messagingEnabled && this.messagesProvider.isMessagePreferencesEnabled();
} }
/** /**