Persist tab selection per document (#2231)

This commit is contained in:
Opender Singh authored and GitHub committed 2020-06-06 13:37:58 +12:00
1 parent 2b9edee71b
commit dfa981f6b5
1 file changed
+2 -2
@@ -67,7 +67,7 @@ class GitSyncDropdown extends React.PureComponent<Props, State> {
// Clear cached items and return if no state
if (!vcs.isInitialized() || !workspaceMeta.gitRepositoryId) {
await models.workspaceMeta.update(workspaceMeta, {
await models.workspaceMeta.updateByParentId(workspace._id, {
cachedGitRepositoryBranch: null,
cachedGitLastAuthor: null,
cachedGitLastCommitTime: null,
@@ -86,7 +86,7 @@ class GitSyncDropdown extends React.PureComponent<Props, State> {
// NOTE: We're converting timestamp to ms here
const cachedGitLastCommitTime = author ? author.timestamp * 1000 : null;
await models.workspaceMeta.update(workspaceMeta, {
await models.workspaceMeta.updateByParentId(workspace._id, {
cachedGitRepositoryBranch,
cachedGitLastAuthor,
cachedGitLastCommitTime,