refresh blocks after setLocale promise returns

Depends on https://github.com/LLK/scratch-vm/pull/1321
This commit is contained in:
chrisgarrity committed 2018-07-11 09:01:24 -04:00
1 parent 3ed7a4b81f
commit 373d571d9b
1 file changed
+6 -5
+6 -5
View File
@@ -148,11 +148,12 @@ class Blocks extends React.Component {
setLocale () {
this.workspace.getFlyout().setRecyclingEnabled(false);
this.ScratchBlocks.ScratchMsgs.setLocale(this.props.locale);
this.props.vm.setLocale(this.props.locale, this.props.messages);
this.workspace.updateToolbox(this.props.toolboxXML);
this.props.vm.refreshWorkspace();
this.workspace.getFlyout().setRecyclingEnabled(true);
this.props.vm.setLocale(this.props.locale, this.props.messages)
.then(() => {
this.workspace.updateToolbox(this.props.toolboxXML);
this.props.vm.refreshWorkspace();
this.workspace.getFlyout().setRecyclingEnabled(true);
});
}
updateToolbox () {