PR feedback
This commit is contained in:
parent
d44adcb7a9
commit
d871ca2b24
2 changed files with 5 additions and 2 deletions
|
@ -71,6 +71,6 @@ export default class BasePlatform {
|
|||
* the current version of the application.
|
||||
*/
|
||||
getAppVersion() {
|
||||
return q();
|
||||
throw new Error("getAppVersion not implemented!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ module.exports = React.createClass({
|
|||
displayName: 'UserSettings',
|
||||
|
||||
propTypes: {
|
||||
version: React.PropTypes.string,
|
||||
onClose: React.PropTypes.func,
|
||||
// The brand string given when creating email pushers
|
||||
brand: React.PropTypes.string,
|
||||
|
@ -66,8 +65,11 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
this._unmounted = false;
|
||||
|
||||
if (PlatformPeg.get()) {
|
||||
PlatformPeg.get().getAppVersion().done((appVersion) => {
|
||||
if (this._unmounted) return;
|
||||
this.setState({
|
||||
vectorVersion: appVersion,
|
||||
});
|
||||
|
@ -90,6 +92,7 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
this._unmounted = true;
|
||||
dis.dispatch({
|
||||
action: 'ui_opacity',
|
||||
sideOpacity: 1.0,
|
||||
|
|
Loading…
Reference in a new issue