There was a recent change in the 7TV api that resulted in the `tags`
field returning null. The serializer currently doesn't handle `null`
cases so it was causing a deserialize error.
A simple fix is to make the field nullable, but I've decided to remove
it completely since it's not used anywhere in the app.
Instead of re-rendering the chat every single time a message comes in,
I've made it so that messages are batche and then rendered all at once
every 200ms.
As a result, the amount of renders are cut from hundreds per second to
just 5. The same technique is used in native Twitch chat.
A side effect is that chat is now a little more readable. Instead of
every single message flying in, they're now grouped with much less
jumps.
Message limit has also been increased to 10000 to allow for greater chat
with minimal performance cost.
Also reverts 717d989.
I previously had to remove the `@action` annotation on some methods due
to an update in the MobX package. The change has since been reverted so
I've decided to add back the annotations.
When messages are added at the same time as the resume scroll button is
pressed, the scroll offset won't be at the edge.
This commit adds an additional post frame callback so that we will also
scroll to the bottom after the build is completed.
Optimized the chat so that resuming PiP does not cause stutters.
This new implementation makes it so that only the latest (100) messages are
rendered at any given time, rather than every single one.
Once autoscroll is disabled and we scroll up in chat, the most recent
messages will be added to a buffer to prevent shifting.
Essentially, I've made it so that the default chat shows only the (100)
most recent messages. When you want to scroll back, the chat will
silently switch to the version with the last (10000) messages, giving
the best of both worlds in performance and scrollback history.