You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-16 22:01:54 +03:00
Second attempt at fixing the Velocity memory leak
1) Correct fix for Velociraptor (we need to find the DOM node and pass that in) 2) Do the same leak fix for the read marker 3) Update the dependency to our fork which is fixed to make the call we do to release memory actually work. 4) Remove the velocity-ui-pack dependency which is unnecessary because velocity-ui is included in the velocity package
This commit is contained in:
@ -86,6 +86,10 @@ module.exports = React.createClass({
|
||||
// to manage its animations
|
||||
this._readReceiptMap = {};
|
||||
|
||||
// Remember the read marker ghost node so we can do the cleanup that
|
||||
// Velocity requires
|
||||
this.readMarkerGhostNode = null;
|
||||
|
||||
this._isMounted = true;
|
||||
},
|
||||
|
||||
@ -422,9 +426,16 @@ module.exports = React.createClass({
|
||||
},
|
||||
|
||||
_startAnimation: function(ghostNode) {
|
||||
Velocity(ghostNode, {opacity: '0', width: '10%'},
|
||||
{duration: 400, easing: 'easeInSine',
|
||||
delay: 1000});
|
||||
if (this.readMarkerGhostNode) {
|
||||
Velocity.Utilities.removeData(this.readMarkerGhostNode);
|
||||
}
|
||||
this.readMarkerGhostNode = ghostNode;
|
||||
|
||||
if (ghostNode) {
|
||||
Velocity(ghostNode, {opacity: '0', width: '10%'},
|
||||
{duration: 400, easing: 'easeInSine',
|
||||
delay: 1000});
|
||||
}
|
||||
},
|
||||
|
||||
_getReadMarkerGhostTile: function() {
|
||||
|
Reference in New Issue
Block a user