1Dot rafaucau Yes and its same in this Jugaad Posts Realtime Polling extension that this problem does not occurs always!
rafaucau 1Dot https://mithril.js.org/autoredraw.html It re-renders. But don't use it in the view method because your code will fall into an infinite loop. 1Dot Yes and its same in this Jugaad Posts Realtime Polling extension I have checked your extension code and I know why the problem occurs for you. Because you have written the extension in such a way that when the redraw happens, it only fetches the posts
1Dot Update v99.4 Fixed Minor Issues. Now It doesn't even requires interaction works like a pro, I mean ultra pro. Update composer update ramesh-dada/realtime php flarum cache:clear Thanks to @rafaucau To Do Add discussion list support auto update discussion list!!
1Dot I updated in my production forum as per @rafaucau suggested with m.redraw and the server load gone to 97% Cpu usage every second Is it expected behaviour???
rafaucau 1Dot You should use debounce function Wait, I'll do a PR because I'm curious about this feature
1Dot rafaucau Wait, I'll do a PR because I'm curious about this feature Super Ultra Pro THANKS I am waiting for you my friend 😄 Edit rafaucau Any Progress on this?
rafaucau 1Dot Yes. @1Dot How about making it refresh the posts every second, for example (without interaction). Does it have to be when the user does something on the page (with interaction)? Because I'm not sure if the interaction thing was intentional.
1Dot rafaucau Because I'm not sure if the interaction thing was intentional. Yes it requires interaction rafaucau How about making it refresh the posts every second, for example (without interaction). Yes with set interval i tried but it adds 100% load again!! @rafaucau So any other way in order to load every second!
rafaucau 1Dot Yes with set interval i tried but it adds 100% load again!! And if it would work well wouldn't interaction be required in this extension? You probably had a problem with an infinite loop here too, but that's easily fixed Because you can make it refresh every second, but only if the user has the window focused.
1Dot rafaucau For this I will need someone's help as I am beginner I mean I literally don't know PHP properly..
1Dot rafaucau I can do a refresh every second so often Yes it will be great if it will be without interaction and works like a pro without adding 100% load on server ! rafaucau but that's easily fixed I am unable to see any PR
rafaucau 1Dot No no no. I'm doing this feature now and wondering how to approach it. I can do a refresh every so often, which will be easier, or with interaction which will be more difficult
1Dot Update v99.5 Thanks to @rafaucau for contributing and making this extension a ultra pro! Major Bug Fixes. No Longer user Interaction Required. No heavy server load. Update composer update ramesh-dada/realtime php flarum cache:clear
rafaucau 1Dot Oops! I forgot to send the JS build in production mode. Type npm update in the /js folder (because I changed config) and then npm run build. BTW. you can configure the Flarum bot to automatically compile files in your repo https://github.com/flarum/action-build