fantasycalendar / obsidian-fantasy-calendar

MIT License
175 stars 7 forks source link

How to refresh the calendar view in the right leaf after having added a new event from the API #79

Closed carlonicora closed 1 year ago

carlonicora commented 1 year ago

Hello,

Is it possible to automatically refresh the right leaf calendar view after having added an even to the calendar?

Current setup

  1. From my API I generate a new Event
  2. I add it to a FC calendar
  3. I save the information through the FC plugin saveCalendar function

Current Issue

After I save the new event in FC, if the calendar is open in the right leaf, the calendar is not refreshed.

I tried a few tricks (for example calling app.workspace.trigger("fantasy-calendars-updated");) but I can't make it work.

Any suggestion would be really welcome!

Thanks