mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-17 14:00:29 +01:00
fix: taskbar icon not pushed via composer/persona
@antosik, partially reverted your PR:342503e07ajust specifically this file:342503e07a/public/src/modules/taskbar.jsI'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
This commit is contained in:
@@ -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 () {
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user