fix: filter:taskbar.push to use hooks module

main
Julian Lam
parent 671387936e
commit df02630b25

@ -2,7 +2,7 @@
"name": "nodebb-theme-persona",
"version": "11.1.3",
"nbbpm": {
"compatibility": "^1.17.0"
"compatibility": "^1.18.0"
},
"description": "Persona theme for NodeBB",
"main": "library.js",

@ -95,7 +95,8 @@ $(document).ready(function () {
}
function setupTaskbar() {
$(window).on('filter:taskbar.push', function (ev, data) {
require(['hooks'], (hooks) => {
hooks.on('filter:taskbar.push', (data) => {
data.options.className = 'taskbar-' + data.module;
if (data.module === 'composer') {
data.options.icon = 'fa-commenting-o';
@ -105,7 +106,7 @@ $(document).ready(function () {
}
}
});
$(window).on('action:taskbar.pushed', function (ev, data) {
hooks.on('action:taskbar.pushed', (data) => {
if (data.module === 'chat') {
createChatIcon(data);
var elData = data.element.data();
@ -114,6 +115,7 @@ $(document).ready(function () {
}
}
});
});
socket.on('event:chats.markedAsRead', function (data) {
$('#taskbar [data-roomid="' + data.roomId + '"]')

Loading…
Cancel
Save