Skip to content

Commit

Permalink
fix: taskbar icon not pushed via composer/persona
Browse files Browse the repository at this point in the history
@Antosik, partially reverted your PR:
342503e

just specifically this file: https://github.com/NodeBB/NodeBB/blob/342503e07add0edd135549b8f554b6ffa6df830d/public/src/modules/taskbar.js

I'm not 100% sure, but it might be because this hook is called sooner than the hook being registered? https://github.com/NodeBB/nodebb-theme-persona/blob/master/public/persona.js#L100-L101  @julianlam
  • Loading branch information
psychobunny committed Aug 17, 2021
1 parent ec103ce commit 3a81c8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/src/modules/taskbar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';


define('taskbar', ['benchpress', 'translator', 'hooks'], function (Benchpress, translator, hooks) {
define('taskbar', ['benchpress', 'translator'], function (Benchpress, translator) {
var taskbar = {};

taskbar.init = function () {
Expand Down Expand Up @@ -89,7 +89,7 @@ define('taskbar', ['benchpress', 'translator', 'hooks'], function (Benchpress, t
element: element,
};

hooks.fire('filter:taskbar.push', data);
$(window).trigger('filter:taskbar.push', data);

if (!element.length && data.module) {
createTaskbarItem(data, callback);
Expand All @@ -116,7 +116,7 @@ define('taskbar', ['benchpress', 'translator', 'hooks'], function (Benchpress, t
btnEl.toggleClass('new', state);

if (!silent) {
hooks.fire('action:taskbar.toggleNew', uuid);
$(window).trigger('action:taskbar.toggleNew', uuid);
}
};

Expand Down Expand Up @@ -175,7 +175,7 @@ define('taskbar', ['benchpress', 'translator', 'hooks'], function (Benchpress, t
data.element = taskbarEl;

taskbarEl.data(data);
hooks.fire('action:taskbar.pushed', data);
$(window).trigger('action:taskbar.pushed', data);
callback(taskbarEl);
});
}
Expand Down Expand Up @@ -213,4 +213,4 @@ define('taskbar', ['benchpress', 'translator', 'hooks'], function (Benchpress, t
};

return taskbar;
});
});

1 comment on commit 3a81c8f

@psychobunny
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @Antosik, just letting you know we will un-revert it once we resolve on persona, etc.
I should have waited a bit longer to get the other plugins/themes ready first before we accepted the PR but no worries, just wanted to say thanks and we will re-add this soon once we figure it out.

@julianlam @barisusakli

Please sign in to comment.