mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-14 22:29:16 +00:00
fix updating of unmounted progress bar
This commit is contained in:
parent
059a6fe00c
commit
bfdfaa9be2
@ -31,10 +31,10 @@ Ui fixes
|
|||||||
* ~~projects autocomplete~~
|
* ~~projects autocomplete~~
|
||||||
* ~~add time ago to build list~~
|
* ~~add time ago to build list~~
|
||||||
* ~~show scm changes on build page~~
|
* ~~show scm changes on build page~~
|
||||||
* react says many many times to console:
|
* ~~react says many many times to console:~~
|
||||||
Warning: setState(...): Can only update a mounted or mounting component.
|
~~Warning: setState(...): Can only update a mounted or mounting component.~~
|
||||||
This usually means you called setState() on an unmounted component.
|
~~This usually means you called setState() on an unmounted component.~~
|
||||||
This is a no-op.
|
~~This is a no-op.~~
|
||||||
* show duration details (steps duration) on build page
|
* show duration details (steps duration) on build page
|
||||||
* speed up build points animation at ff
|
* speed up build points animation at ff
|
||||||
* current successfully streak icons at project page
|
* current successfully streak icons at project page
|
||||||
|
@ -13,13 +13,16 @@ define([
|
|||||||
build.project.avgBuildDuration * 100);
|
build.project.avgBuildDuration * 100);
|
||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
var self = this,
|
var self = this;
|
||||||
updateCallback = function() {
|
var updateCallback = function() {
|
||||||
if (self.props.build.status === 'in-progress') {
|
if (self.props.build.status === 'in-progress') {
|
||||||
|
if (self.isMounted()) {
|
||||||
self.setState({percent: self._computePercent()});
|
self.setState({percent: self._computePercent()});
|
||||||
_.delay(updateCallback, 100);
|
_.delay(updateCallback, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
updateCallback();
|
updateCallback();
|
||||||
},
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user