luiisca / obsidian-periodic-notes-calendar

Obsidian calendar plugin for writing and organizing periodic notes (daily to yearly). Navigate via command palette or calendar UI. Summarize entries with stickers in calendar view. Streamline planning, reviewing, and reflection.
MIT License
0 stars 0 forks source link

selecting a sticker would sometimes add it to the wrong file #15

Closed luiisca closed 5 hours ago

linear[bot] commented 6 hours ago

GIT-456 selecting a sticker would sometimes add it to the wrong file

luiisca commented 5 hours ago

sticker popover is a singleton, so it carries the data it was initially instantiated with on every call to open(), effectively making sticker popover point to the same file no matter which file it was opened for.

                            Popover.create({
                                id: STICKER_POPOVER_ID,
                                view: {
                                    Component: StickerPopoverComponent,
                                    props: {
                                        fileData
                                    }
                                },
                            }).open(this.refHtmlEl)