Fix #1106. Hydrate blocks on sync. (#1107)

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
This commit is contained in:
Chen-I Lim 2021-08-26 18:33:51 -07:00 committed by GitHub
parent 10275e0339
commit c3f5993126
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
// See LICENSE.txt for license information.
import {Utils} from './utils'
import {Block} from './blocks/block'
import {OctoUtils} from './octoUtils'
// These are outgoing commands to the server
type WSCommand = {
@ -232,7 +233,7 @@ class WSClient {
private queueUpdateNotification(block: Block) {
this.updatedBlocks = this.updatedBlocks.filter((o) => o.id !== block.id) // Remove existing queued update
this.updatedBlocks.push(block)
this.updatedBlocks.push(OctoUtils.hydrateBlock(block))
if (this.updateTimeout) {
clearTimeout(this.updateTimeout)
this.updateTimeout = undefined