Merge pull request #1456 from sharelatex/sk-references-refresh

When refreshing linked file, if it's from mendeley/zotero, re-index

GitOrigin-RevId: 4f9916d0682335e1477674b46c1133a4a9d0e6af
This commit is contained in:
Chrystal Maria Griffiths 2019-02-04 11:12:37 +00:00 committed by sharelatex
parent 2463fef390
commit 09444a5e42

View file

@ -98,7 +98,17 @@ define(['base', 'moment'], (App, moment) =>
return ($scope.refreshError = null)
})
.catch(response => ($scope.refreshError = response.data))
.finally(() => ($scope.refreshing = false))
.finally(() => {
$scope.refreshing = false
const provider = file.linkedFileData.provider
if (
provider === 'mendeley' ||
provider === 'zotero' ||
file.name.match(/^.*\.bib$/)
) {
ide.$scope.$emit('references:should-reindex', {})
}
})
}
// Callback fired when the `img` tag fails to load,