Commit babb90a7 authored by Phil Hughes's avatar Phil Hughes

replace the tab with the review pending tab

parent 8c4ad738
...@@ -100,13 +100,7 @@ export default { ...@@ -100,13 +100,7 @@ export default {
const pendingTab = state.openFiles.find(f => f.path === file.path && f.pending); const pendingTab = state.openFiles.find(f => f.path === file.path && f.pending);
Object.assign(state, { Object.assign(state, {
openFiles: state.openFiles.map(f => { openFiles: state.openFiles.map(f => Object.assign(f, { active: false })),
if (!f.pending) {
return Object.assign(f, { active: false });
}
return f;
}),
}); });
if (pendingTab) { if (pendingTab) {
...@@ -121,11 +115,22 @@ export default { ...@@ -121,11 +115,22 @@ export default {
}); });
} else { } else {
Object.assign(state, { Object.assign(state, {
openFiles: state.openFiles.concat({ entries: Object.assign(state.entries, {
...file, [file.path]: Object.assign(state.entries[file.path], {
active: true, opened: false,
pending: true, }),
key: `pending-${file.key}`, }),
openFiles: state.openFiles.map(f => {
if (f.path === file.path) {
return {
...f,
active: true,
pending: true,
key: `pending-${f.key}`,
};
}
return f;
}), }),
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment