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

[mobile] Multiple notifications generated upon Obsidian startup #149

Closed
SebastianMC opened this issue Jun 12, 2024 · 3 comments
Closed

[mobile] Multiple notifications generated upon Obsidian startup #149

SebastianMC opened this issue Jun 12, 2024 · 3 comments
Assignees
Labels
minor A not critical ticket on hold Paused - will be resumed or cancelled.

Comments

@SebastianMC
Copy link
Owner

As a result of internal changes in Obsidian 1.6.x for plugin lifecycle and probably related to the bugfix #147 a series of notifications is shown by the plugin on start on mobile (screenshot below).

While it is better to have superfluous notifications and correct sorting applied automatically than no custom sorting applied, the multiple notifications deserve investigation and fixing.

First reported by @Azmoinal in this comment under #147


Screenshot for context
IMG_B31A38660AE0-1

@SebastianMC
Copy link
Owner Author

Some further observations: the multi-notification on mobile seem to happen rarely, not in day-to-day use. Opening, switching, reopening a vault, closing, exiting, etc. don't cause the superfluous notifications flow.

The screenshot attached to this ticket comes from scenario when the Obsidian app and the vault hasn't been open for a while (a month or so).

At code level the notifications are generated only when the plugin is initialized by Obsidian. Multiple repeated notifications suggest some kind of auto-restarting of plugins subsystem by Obsidian. Hence a correct response of the plugin to Obsidian-generated events.

Need to collect more observations - as for now this seem to be a minor issue occurring in some edge cases.

@Azmoinal
Copy link

I agree with you, it is not a breaking point. I'm not sure but opening my vault it seems frequent, only at opening.

After that I can work without any other notification. I'll try to find a way to reproduce it. I'll keep you informed.

Anyway @SebastianMC thanks a lot for you effort in maintaining the plugin.

@SebastianMC SebastianMC added on hold Paused - will be resumed or cancelled. and removed bug Something isn't working labels Jun 28, 2024
@SebastianMC
Copy link
Owner Author

SebastianMC commented Jul 8, 2024

Did some more investigation and the final conclusion is to keep the behavior as-is.
Background:

  • showing superfluous notifications upon vault (re)open doesn't impact the sorting functionality
  • showing the notifications is driven by Obsidian system events: plugin load, first refresh of the metadata cache, there is also a scenario driven by loading of File Explorer by Obsidian, if it is delayed. And eventually there is the most obvious scenario, when the sorting is applied, implicitly or explicitly. Some sequences of these events could indeed cause multiple notifications. At the same time it is not feasible to try to finetune the logic to recognize each of edge scenarios to determine if to show or not the notification
  • potential solution would be to prevent subsequent notifications time-based, e.g. 500 ms of time buffer. At the same time it seems to be an overkill - superfluous notifications on vault (re)opening don't hurt

Based on the above, closing the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor A not critical ticket on hold Paused - will be resumed or cancelled.
Projects
None yet
Development

No branches or pull requests

2 participants