refresh blocks after setLocale promise returns
Depends on https://github.com/LLK/scratch-vm/pull/1321
This commit is contained in:
1 parent
3ed7a4b81f
commit
373d571d9b
1 file changed
+6
-5
@@ -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 () {
|
||||
|
||||
Reference in new issue
Block a user