Commit 2c7135b
committed
fix(files_versions): update version only after save with current mtime
- files_version matches the item's mtime with the node's to consider
whether an item is the current one. This often does not match with
Date.now() as it does not match real file's mtime
- fetches the current mtime from the server upon save. This can be avoided,
when Collabora also sends the mtime along the Doc_ModifiedStatus message
- Action_Save and UI_Save actions would trigger updates before the actual
save action, meta data cannot be correct at this time
- There are still edge cases:
1. The current version is not always detected correctly, leading to
"broken" preview image and download link. The image stays until a
refresh, the link will work once it turns into a regular version.
It is already a lot better.
2. Sometimes the version generation can take longer (saw it happening
once after 2min), in those case the preview and download link do not
work. Out of scope here.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Assisted-by: Claude:claude-sonnet-51 parent 170f8aa commit 2c7135b
2 files changed
Lines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
490 | 497 | | |
491 | 498 | | |
492 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
529 | | - | |
| 529 | + | |
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | 583 | | |
592 | 584 | | |
593 | 585 | | |
594 | 586 | | |
595 | | - | |
| 587 | + | |
596 | 588 | | |
597 | 589 | | |
598 | 590 | | |
| |||
0 commit comments