1Dot You should use debounce function Wait, I'll do a PR because I'm curious about this feature
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?
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.
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!
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.
rafaucau For this I will need someone's help as I am beginner I mean I literally don't know PHP properly..
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
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 I am unable to see any PR
Because I haven't finished it yet
@1Dot you can check PR. It works now without interaction and server overload
composer update ramesh-dada/realtime php flarum cache:clear
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.
npm update
/js
npm run build
BTW. you can configure the Flarum bot to automatically compile files in your repo https://github.com/flarum/action-build
I checked the new build and guess what it only uses 6% cpu i5 3rd gen!
1Dot
what is the reason for this error
1Dot I checked the new build and guess what it only uses 6% cpu i5 3rd gen!
It would also be worthwhile to add the possibility to set in the admin panel how often posts should refresh. Then it will be possible to adjust the frequency of refreshing to the capabilities of the server and the traffic.
czayorijinal Sorry use the below command please!
composer require ramesh-dada/realtime:*
1Dot thank you, the plugin is awesome, well done
rafaucau Yes great I will try it today or tomorrow if I will be able to achieve then I will post an update and also I am trying to auto refresh discussion list on home page.
1Dot I'm a bit bored today 😃 I can send another PR
rafaucau Yes always happy to learn from you and implement your changes at a glance. 🙏🙏