Fix regression reloading pages changed "on disk"
parent
bb8f594a68
commit
bd3e91ba65
|
@ -600,13 +600,12 @@ export class Client {
|
||||||
"file:changed",
|
"file:changed",
|
||||||
(
|
(
|
||||||
path: string,
|
path: string,
|
||||||
localChange: boolean,
|
_localChange: boolean,
|
||||||
oldHash: number,
|
oldHash: number,
|
||||||
newHash: number,
|
newHash: number,
|
||||||
) => {
|
) => {
|
||||||
// Only reload when watching the current page (to avoid reloading when switching pages)
|
// Only reload when watching the current page (to avoid reloading when switching pages)
|
||||||
if (
|
if (
|
||||||
!localChange &&
|
|
||||||
this.space.watchInterval && `${this.currentPage}.md` === path &&
|
this.space.watchInterval && `${this.currentPage}.md` === path &&
|
||||||
// Avoid reloading if the page was just saved (5s window)
|
// Avoid reloading if the page was just saved (5s window)
|
||||||
(!lastSaveTimestamp || (lastSaveTimestamp < Date.now() - 5000))
|
(!lastSaveTimestamp || (lastSaveTimestamp < Date.now() - 5000))
|
||||||
|
|
Loading…
Reference in New Issue