-
-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Check for existing bug reports before submitting.
- I searched for existing Bug Reports and found no similar reports.
Expected Behavior
only one calendar window should exist in the sidebar at any time.
Current behaviour
repeatedly running "open calendar" reopens new windows in the sidebar.
Reproduction
On Desktop:
- Have Obsidian open with Calendarium installed and a calendar created
- click Open Calendarium
The sidebar opens with the calendar view - click Open Calendarium again
You will notice a second Icon in the sidebar (you may have to increase the sidebar width so that all icons are visible)
On Mobile:
Here is where I first encountered this. When using the android app, The available sidebar views are displayed in a dropdown. Afte using Open Calendarium multiple times, this menu is extremely cluttered:
Which Operating Systems are you using?
- Android
- iPhone/iPad
- Linux
- macOS
- Windows
Obsidian Version Check
v1.8.7 and 1.7.7
Plugin Version
1.5.0
Confirmation
- I have disabled all other plugins and the issue still persists.
Possible solution
workaround
manually editing workspace.json
and removing the "type": "CALENDARIUM"
leaf objects, removes the redundant views
This JQ command does that (it deletes all in the sidebar, you have to reopen one):
jq 'del(.right.children[].children[] | select(.state.type | . == "CALENDARIUM" or . == "CALENDARIUM_AGENDA"))'
ideas on how to approach
One Idea would be to make the view a singleton, only ever having a single view.
But it should be discussed if having a calendar in the sidebar as well as as a tab in the workspace is a required feature. Than I believe the number of views should only be limited in the sidebar and not everywhere