SebastianMC / obsidian-custom-sort

Take full control over the order and sorting of folders and notes in File Explorer in Obsidian
GNU General Public License v3.0
252 stars 19 forks source link

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 closed 3 weeks ago

SebastianMC commented 3 weeks ago

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:

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

SebastianMC commented 3 weeks ago

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 commented 3 weeks ago

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

SebastianMC commented 3 weeks ago

Plugin release 2.1.11 was released with the fix.

Azmoinal commented 3 weeks ago

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 commented 3 weeks ago

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