mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Merge pull request #2232 from benjiwheeler/dont-get-extensions
moved getExtensions out of constructor, and out of projectInfo response
This commit is contained in:
commit
8653e358b1
1 changed files with 1 additions and 2 deletions
|
@ -80,7 +80,6 @@ class Preview extends React.Component {
|
|||
addToStudioOpen: false,
|
||||
reportOpen: false
|
||||
};
|
||||
this.getExtensions(this.state.projectId);
|
||||
this.addEventListeners();
|
||||
/* In the beginning, if user is on mobile and landscape, go to fullscreen */
|
||||
this.setScreenFromOrientation();
|
||||
|
@ -91,12 +90,12 @@ class Preview extends React.Component {
|
|||
this.props.sessionStatus === sessionActions.Status.FETCHED) ||
|
||||
(this.state.projectId !== prevState.projectId))) {
|
||||
this.fetchCommunityData();
|
||||
this.getExtensions(this.state.projectId);
|
||||
}
|
||||
if (this.state.projectId === '0' && this.state.projectId !== prevState.projectId) {
|
||||
this.props.resetProject();
|
||||
}
|
||||
if (this.props.projectInfo.id !== prevProps.projectInfo.id) {
|
||||
this.getExtensions(this.state.projectId);
|
||||
if (typeof this.props.projectInfo.id === 'undefined') {
|
||||
this.initCounts(0, 0);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue