Browse Source

Hide distribution list creation if unsupported

Danilo Bargen 7 years ago
parent
commit
1c1bc24db1
2 changed files with 8 additions and 0 deletions
  1. 1 0
      src/partials/messenger.navigation.html
  2. 7 0
      src/partials/messenger.ts

+ 1 - 0
src/partials/messenger.navigation.html

@@ -177,6 +177,7 @@
                 <md-icon class="material-icons md-24">group_add</md-icon>
             </md-button>
             <md-button
+                    ng-if="ctrl.showCreateDistributionListButton()"
                     ng-click="ctrl.createDistributionList()"
                     translate-attr="{'aria-label': 'messenger.CREATE_DISTRIBUTION_LIST'}"
                     aria-label="Create Distribution list"

+ 7 - 0
src/partials/messenger.ts

@@ -1000,6 +1000,13 @@ class NavigationController {
         return this.webClientService.me;
     }
 
+    /**
+     * Only show the "create distribution list" button if the app supports it.
+     */
+    public showCreateDistributionListButton(): boolean {
+        return this.webClientService.appCapabilities.distributionLists;
+    }
+
 }
 
 class MessengerController {