This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var currentScroll = window.scrollY; | |
var currentlyScrolling = false; | |
var runOnScroll = function(evt) { | |
if (currentlyScrolling) { | |
// preventDefault doesn't seem to work | |
window.scrollTo(window.X, currentScroll); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setMessageStatus(uniqueId, status) { | |
return this.state.messages.map(function(message) { | |
if (message.uniqueId !== uniqueId) { | |
return message; | |
} | |
return Object.assign({}, message, {status}); | |
}); | |
} |