File metadata is updated incorrectly after editing

Hi,

I found an issue in the files app where the file timestamps and file sizes aren’t updated correctly after editing a file.

This function gets the modification time from the ‘data-timestamp’ attribute which is only set on page load so it will have an incorrect value after the file has been modified.

I created an issue for this: https://github.com/nextcloud/server/issues/22023 and a possible fix which updates the correct attributes for the timestamps and file sizes every 30 seconds: https://github.com/nextcloud/server/pull/22024

Let me know what you think about it.

I guess we can discuss on github but the change adds quite some complexity and load to the file list rendering, like right now you do not have to worry about concurrent changes after the page load, and the server is only bothered one with processing the potential heavy operation of getting a list of files.

I do understand your intention, but technically this isn’t ideal. We have some long-term goals of replacing the current files app with one written in Vue.js, moreover there are experiments with server push technology. Once we have those two, it would be relatively easy to accomplish a UI that updates automatically. Right now all the advanced logic we add will more likely trigger more new bugs than it fixes.