Update modified immediately when entering a folder

This commit is contained in:
Leo Vasanko 2023-11-13 02:19:13 -08:00
parent c8d5f335b1
commit dd37238510

View File

@ -234,7 +234,7 @@ let modifiedTimer: any = null
const updateModified = () => { const updateModified = () => {
for (const doc of props.documents) doc.modified = formatUnixDate(doc.mtime) for (const doc of props.documents) doc.modified = formatUnixDate(doc.mtime)
} }
onMounted(() => { modifiedTimer = setInterval(updateModified, 1000) }) onMounted(() => { updateModified(); modifiedTimer = setInterval(updateModified, 1000) })
onUnmounted(() => { clearInterval(modifiedTimer) }) onUnmounted(() => { clearInterval(modifiedTimer) })
const mkdir = (doc: Document, name: string) => { const mkdir = (doc: Document, name: string) => {
const control = connect(controlUrl, { const control = connect(controlUrl, {