Skip to content

Commit e6d4fe4

Browse files
authored
Merge pull request #9250 from scratchfoundation/revert-9242-disable-metadata
Revert "fix: disable metadata for now"
2 parents 960cb97 + 46c39ea commit e6d4fe4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/containers/gui.jsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,16 @@ import systemPreferencesHOC from '../lib/system-preferences-hoc.jsx';
4141
import GUIComponent from '../components/gui/gui.jsx';
4242
import {setIsScratchDesktop} from '../lib/isScratchDesktop.js';
4343

44-
// const {RequestMetadata, setMetadata, unsetMetadata} = storage.scratchFetch;
44+
const {RequestMetadata, setMetadata, unsetMetadata} = storage.scratchFetch;
4545

46-
// TODO: re-enable metadata
47-
const setProjectIdMetadata = projectId => { // eslint-disable-line no-unused-vars
46+
const setProjectIdMetadata = projectId => {
4847
// If project ID is '0' or zero, it's not a real project ID. In that case, remove the project ID metadata.
4948
// Same if it's null undefined.
50-
// if (projectId && projectId !== '0') {
51-
// setMetadata(RequestMetadata.ProjectId, projectId);
52-
// } else {
53-
// unsetMetadata(RequestMetadata.ProjectId);
54-
// }
49+
if (projectId && projectId !== '0') {
50+
setMetadata(RequestMetadata.ProjectId, projectId);
51+
} else {
52+
unsetMetadata(RequestMetadata.ProjectId);
53+
}
5554
};
5655

5756
class GUI extends React.Component {

0 commit comments

Comments
 (0)