Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A race condition (first observed for Obsidian 1.6.3) could cause the plugin not to apply the custom sort automatically on vault opening / loading or app (re)loading #147

Closed
SebastianMC opened this issue Jun 10, 2024 · 5 comments

Comments

@SebastianMC
Copy link
Owner

SebastianMC commented Jun 10, 2024

First observed in Obsidian 1.6.3
(Re)opening a vault shows the custom sorting is active (ribbon icon) and the notifications also tell that the custom sorting was applied. At the same time File Explorer items are sorted with standard Obsidian. You need to explicitly apply the custom sorting (ribbon icon click or command from commands palette) to make it work.

Yet another Obsidian breaking change made in not-backward compatible way?

Affected scenarios:

  • starting the Obsidian app and opening a vault
  • restarting the Obsidian app and (automatic) opening a vault
  • forced reload of the vault (from Obsidian UI menu)

Pending investigation (classified as retro bug resulting from Obsidian update)

@SebastianMC
Copy link
Owner Author

SebastianMC commented Jun 10, 2024

First observation - disabling or uninstalling the DataView plugin resolves the problem. A dependency???
[update: a DataView related observation was coincidence only, somehow triggering the race condition to occur more often]

@SebastianMC
Copy link
Owner Author

Observation: it looks like a race condition between some of system (Obsidian) plugin-specific events.

SebastianMC added a commit that referenced this issue Jun 10, 2024
@SebastianMC SebastianMC changed the title In Obsidian 1.6.3 the custom sorting is not applied automatically after reload of the vault A race condition (first observed for Obsidian 1.6.3) could cause the plugin not to apply the custom sort automatically on vault opening / loading or app (re)loading Jun 10, 2024
@SebastianMC
Copy link
Owner Author

Plugin release 2.1.11 was released with the fix.

@Azmoinal
Copy link

Azmoinal commented Jun 12, 2024

I'm not sure if it is a side effect of this fix but on my ipad/iphone at restart of Obsidian there are several notifications reporting that "custom order applied correctly".

I've the option for custom order status change notification enabled on mobile.

Tomorrow, I could check if the same happen on the desktop.

Anyway the custom order is applied correctly, it is only a matter to receive sometimes two or four/five times the initial notification.

@SebastianMC SebastianMC reopened this Jun 12, 2024
@SebastianMC
Copy link
Owner Author

SebastianMC commented Jun 12, 2024

Hi @Azmoinal

thank you very much for your report!
Indeed when retested on ipad I'm observing the same behavior (screenshot below).
In general, it is better to have superfluous notifications and correct sorting applied automatically than no custom sorting applied. At the same time, the multiple notifications deserve investigation. I opened #149.

IMG_B31A38660AE0-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants