-
Notifications
You must be signed in to change notification settings - Fork 85
Make image version query a timestamp fixes #60 #63
Conversation
The rerendering of the preview was also decoupled from the pathwatcher listener. Now all pathwatcher events are captured and processed including all those triggered by the same file modification as described in atom/node-pathwatcher#50.
If you want, I can have a look at the OSX specific problems :) |
That would be great thanks @leipert |
@Galadirith. The problem seems to be the following. If you delete a picture on OSX the pathwatcher get's destroyed as well and therefore the version is not updated after restoring. |
Ah ok, great thanks @leipert |
@leipert I have a rather mucky fix that involves watching the directory of the image to observe if it is restored. However, while it was me who suggested this deletion, restoration cycle should be fixed, do you actually think it should be? I suppose I have somewhat lost sight of the original issue #49; should our only responsibility be to updating a file for the duration of its first life? A very simple workaround to making an image show up if it either never existed and then was created, or was deleted and then restored is to simply force a re-render of the preview (by either toggling or editing the source), and then your If you think that is reasonable, let me know, I'll strip out the delete, restore cycle specs. Thanks @leipert. |
…y instead of the file.
@Galadirith As my latest commit seems to be failing on linux and windows as well and is rather slow, let's just do the following: Reverse my commit and strip out those specs we do not need. We just have to make sure that the most recent image is shown if the preview is opened or the image is changed. |
So maybe add a spec which handles the following:
|
Maybe we also do not need between a |
Yeh I would agree :D, I'll make the changes. |
Okay. Once it works again, you can maybe push the new version to the users |
Great, will do :D |
…directory instead of the file." This reverts commit bd24496.
Restored images may be either images that we're previously renamed or previously deleted. To force a restored image to preview a rerender through either a preview toggle or source edit is required. Note that on windows pathwatcher does still watch files even after their their path no longer exists, updating the preview even for restored images withour a forced rerender, but on OSX it does not.
The rerendering of the preview was also decoupled from the pathwatcher
listener. Now all pathwatcher events are captured and processed
including all those triggered by the same file modification as described
in atom/node-pathwatcher#50.