nodebb-theme-harmony 2.2.19 → 2.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "2.2.19",
3
+ "version": "2.2.20",
4
4
  "nbbpm": {
5
5
  "compatibility": "^4.0.0"
6
6
  },
package/public/harmony.js CHANGED
@@ -143,12 +143,10 @@ $(document).ready(function () {
143
143
  function setupDrafts() {
144
144
  require(['composer/drafts', 'bootbox'], function (drafts, bootbox) {
145
145
  const draftsEl = $('[component="sidebar/drafts"]');
146
-
146
+ const bottomBarDraftsEl = $('[component="bottombar"] [component="sidebar/drafts"]');
147
147
  function updateBadgeCount() {
148
148
  const count = drafts.getAvailableCount();
149
- if (count > 0) {
150
- draftsEl.removeClass('hidden');
151
- }
149
+ bottomBarDraftsEl.toggleClass('hidden', count === 0);
152
150
  $('[component="drafts/count"]').toggleClass('hidden', count <= 0).text(count);
153
151
  }
154
152