Skip to content

Commit d941b9d

Browse files
authored
Merge pull request #320 from adzhindzhi/uepr-307-loading-extension-toast-displayed-multiple-times
[UEPR-307] Fix loading extension toast displayed multiple times
2 parents 6445a08 + 5165851 commit d941b9d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/scratch-gui/src/lib/alerts/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ const alerts = [
216216
{
217217
alertId: 'loadingExtensionData',
218218
alertType: AlertTypes.STANDARD,
219-
clearList: [],
219+
clearList: ['loadingExtensionData'],
220220
content: (
221221
<FormattedMessage
222222
defaultMessage="Loading extension..."

packages/scratch-gui/src/lib/vm-listener-hoc.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ const vmListenerHOC = function (WrappedComponent) {
6969
}
7070
componentWillUnmount () {
7171
this.props.vm.removeListener('PERIPHERAL_CONNECTION_LOST_ERROR', this.props.onShowExtensionAlert);
72+
this.props.vm.removeListener('EXTENSION_DATA_LOADING', this.props.onExtensionDataLoading);
73+
7274
if (this.props.attachKeyboardEvents) {
7375
document.removeEventListener('keydown', this.handleKeyDown);
7476
document.removeEventListener('keyup', this.handleKeyUp);

0 commit comments

Comments
 (0)