You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-04 23:02:14 +03:00
PR feedback
This commit is contained in:
@@ -71,6 +71,6 @@ export default class BasePlatform {
|
|||||||
* the current version of the application.
|
* the current version of the application.
|
||||||
*/
|
*/
|
||||||
getAppVersion() {
|
getAppVersion() {
|
||||||
return q();
|
throw new Error("getAppVersion not implemented!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,6 @@ module.exports = React.createClass({
|
|||||||
displayName: 'UserSettings',
|
displayName: 'UserSettings',
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
version: React.PropTypes.string,
|
|
||||||
onClose: React.PropTypes.func,
|
onClose: React.PropTypes.func,
|
||||||
// The brand string given when creating email pushers
|
// The brand string given when creating email pushers
|
||||||
brand: React.PropTypes.string,
|
brand: React.PropTypes.string,
|
||||||
@@ -66,8 +65,11 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
|
this._unmounted = false;
|
||||||
|
|
||||||
if (PlatformPeg.get()) {
|
if (PlatformPeg.get()) {
|
||||||
PlatformPeg.get().getAppVersion().done((appVersion) => {
|
PlatformPeg.get().getAppVersion().done((appVersion) => {
|
||||||
|
if (this._unmounted) return;
|
||||||
this.setState({
|
this.setState({
|
||||||
vectorVersion: appVersion,
|
vectorVersion: appVersion,
|
||||||
});
|
});
|
||||||
@@ -90,6 +92,7 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
|
this._unmounted = true;
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'ui_opacity',
|
action: 'ui_opacity',
|
||||||
sideOpacity: 1.0,
|
sideOpacity: 1.0,
|
||||||
|
Reference in New Issue
Block a user