From 50322300ac5bf828760d9ed51d5884c95d5fa33d Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 11 Apr 2022 12:50:33 +0200 Subject: [PATCH] MOBILE-3833 forum: Display word count below post text --- .../components/post-options-menu/post-options-menu.html | 5 ----- .../forum/components/post-options-menu/post-options-menu.ts | 2 -- src/addons/mod/forum/components/post/post.html | 3 +++ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/addons/mod/forum/components/post-options-menu/post-options-menu.html b/src/addons/mod/forum/components/post-options-menu/post-options-menu.html index ee0955932..2ff947373 100644 --- a/src/addons/mod/forum/components/post-options-menu/post-options-menu.html +++ b/src/addons/mod/forum/components/post-options-menu/post-options-menu.html @@ -12,11 +12,6 @@

{{ 'core.discard' | translate }}

- - -

{{ 'core.numwords' | translate: {'$a': wordCount} }}

-
-
diff --git a/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts b/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts index ad13a1e84..257d8ec78 100644 --- a/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts +++ b/src/addons/mod/forum/components/post-options-menu/post-options-menu.ts @@ -34,7 +34,6 @@ export class AddonModForumPostOptionsMenuComponent implements OnInit, OnDestroy @Input() cmId!: number; @Input() forumId!: number; // The forum Id. - wordCount?: number | null; // Number of words when available. canEdit = false; canDelete = false; loaded = false; @@ -89,7 +88,6 @@ export class AddonModForumPostOptionsMenuComponent implements OnInit, OnDestroy this.canDelete = !!this.post.capabilities.delete && AddonModForum.isDeletePostAvailable(); this.canEdit = !!this.post.capabilities.edit && AddonModForum.isUpdatePostAvailable(); - this.wordCount = (this.post.haswordcount && this.post.wordcount) || null; this.loaded = true; } diff --git a/src/addons/mod/forum/components/post/post.html b/src/addons/mod/forum/components/post/post.html index 9812ff26f..ab1f83cfe 100644 --- a/src/addons/mod/forum/components/post/post.html +++ b/src/addons/mod/forum/components/post/post.html @@ -63,6 +63,9 @@ +

+ {{ 'core.numwords' | translate: {'$a': post.wordcount} }} +