Chatterino / chatterino2

Chat client for https://twitch.tv
MIT License
2.04k stars 449 forks source link

fix: set maximum of scrollbar after filtering #5329

Closed Nerixyz closed 5 months ago

Nerixyz commented 5 months ago

When adding messages to a ChannelView from an already existing channel and filtering those, the final number of messages will be lower (or equal) than the number of messages actually added. The same can appear if the message snapshot is larger than what ChannelView::messages_ can hold. If we set the maximum before filtering, it might be higher than the actual amount and most importantly, it might be higher than the capacity of messages_, which will cause it to never decrease (and create the observed gap).

I thought it was introduced in #5248, but this doesn't seem to be the case.

Fixes #5327.