Temperamental add-on.

Load older messages by simply scrolling up/down the message history
Post Reply
Bgagger
Donor
Posts: 45
Joined: 28 Nov 2018, 15:57

Temperamental add-on.

#1

Post by Bgagger » 06 Jun 2019, 19:21

This is a very useful add-on! Though there has been a problem with it that I think I have finally found the solution to.

Infinite Scroll has always been a bit temperamental as for when it wants to work.
Mostly it works just fine, but it has always been acting up now and then ever since we first started using it with our fresh mchat install. At odd times it just stops working. Only to suddenly work again later.
At times it doesn't load older posts at all. mchat loads however many messages it is set to load as default, then gets stuck. Sometimes in certain rooms, sometimes overall. Sometimes reloading the page makes it suddenly work again, but sometimes not. You scroll up and down and nothing happens. Like the add-on is not installed at all.

For the first time I think I have been able to pin down the cause of this. It appears to be related to the number of messages mchat is set to display. We have had this set to 10, as is the default.
But when raising the 'Initial number of messages to display on the mChat page' setting, it starts to work more often, specifically after posting a number of messages. I have found that setting this to 14, then infinite scroll now works all the time.
I am not certain this magic number is universal though, as I suspect it may be linked to the height of the mChat message window somehow.

In any case, I hope this information can be helpful for development, or if anyone else have had a similar problem.

terry2
Donor
Posts: 192
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: Temperamental add-on.

#2

Post by terry2 » 08 Jun 2019, 13:13

Your find you can go up to 20 messages max to show in mchat before any thing happens and yes your right it depends on height and how many to show they seem to have to balance out if you use random numbers you get strange results.

Height and posts to show have to seem the match the height of the box

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest