mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #6008 from overleaf/ae-clear-cache-file-list
[web] Clear the list of downloadable files after clearing the compile cache GitOrigin-RevId: d1d655612e6705f77c283b06012f8b5c14ed8f7a
This commit is contained in:
@@ -380,10 +380,17 @@ export function CompileProvider({ children }) {
|
|||||||
const clearCache = useCallback(() => {
|
const clearCache = useCallback(() => {
|
||||||
setClearingCache(true)
|
setClearingCache(true)
|
||||||
|
|
||||||
return compiler.clearCache().finally(() => {
|
return compiler
|
||||||
setClearingCache(false)
|
.clearCache()
|
||||||
})
|
.then(() => {
|
||||||
}, [compiler, setClearingCache])
|
setFileList(undefined)
|
||||||
|
setPdfDownloadUrl(undefined)
|
||||||
|
setPdfUrl(undefined)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
setClearingCache(false)
|
||||||
|
})
|
||||||
|
}, [compiler, setPdfDownloadUrl, setPdfUrl])
|
||||||
|
|
||||||
// clear the cache then run a compile, triggered by a menu item
|
// clear the cache then run a compile, triggered by a menu item
|
||||||
const recompileFromScratch = useCallback(() => {
|
const recompileFromScratch = useCallback(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user