Fix MessageBox scroll stutter when state updates while close to the bottom

This commit is contained in:
Ken-Håvard Lieng 2019-02-08 09:28:55 +01:00
parent c1e1f2c327
commit 7ad76273c0
7 changed files with 109 additions and 86 deletions

View file

@ -80,7 +80,8 @@ export default createCommandMiddleware(COMMAND, {
if (newTopic.length > 0) {
dispatch(setTopic(newTopic.join(' '), channel, server));
return;
} if (channel) {
}
if (channel) {
const { topic } = getState().channels[server][channel];
if (topic) {
return text(topic);