mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
When clearing the runtime, emit has cloud data update.
This commit is contained in:
parent
b828444ea8
commit
6d033af61e
1 changed files with 10 additions and 1 deletions
|
@ -1540,6 +1540,16 @@ class Runtime extends EventEmitter {
|
|||
this.targets.map(this.disposeTarget, this);
|
||||
this._monitorState = OrderedMap({});
|
||||
// @todo clear out extensions? turboMode? etc.
|
||||
|
||||
// *********** Cloud *******************
|
||||
|
||||
// If the runtime currently has cloud data,
|
||||
// emit a has cloud data update event resetting
|
||||
// it to false
|
||||
if (this.hasCloudData()) {
|
||||
this.emit(Runtime.HAS_CLOUD_DATA_UPDATE, false);
|
||||
}
|
||||
|
||||
this.ioDevices.cloud.clear();
|
||||
|
||||
// Reset runtime cloud data info
|
||||
|
@ -1548,7 +1558,6 @@ class Runtime extends EventEmitter {
|
|||
this.canAddCloudVariable = newCloudDataManager.canAddCloudVariable;
|
||||
this.addCloudVariable = this._initializeAddCloudVariable(newCloudDataManager);
|
||||
this.removeCloudVariable = this._initializeRemoveCloudVariable(newCloudDataManager);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue