mirror of
https://hk.gh-proxy.com/https://github.com/NodeBB/nodebb-plugin-poll.git
synced 2025-10-04 04:41:13 +08:00
fix: poll not showing up when infinitescroll is used
This commit is contained in:
parent
5dc857a3bd
commit
3887e429d4
1 changed files with 8 additions and 0 deletions
|
@ -16,6 +16,14 @@ window.Poll = {};
|
|||
}
|
||||
});
|
||||
|
||||
$(window).on('action:posts.loaded', function (ev, data) {
|
||||
data.posts.forEach((post) => {
|
||||
if (post.hasOwnProperty('pollId')) {
|
||||
getPoll(post.pollId);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(window).on('action:posts.edited', function (ev, data) {
|
||||
if (data.post.hasOwnProperty('pollId')) {
|
||||
getPoll(data.post.pollId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue