FlorianWoelki / obsidian-iconize

Simply add icons to anything you want in Obsidian.
https://florianwoelki.github.io/obsidian-iconize/
MIT License
852 stars 58 forks source link

Icon sets multiplying #370

Open lunule opened 8 months ago

lunule commented 8 months ago

Describe the bug With time, the installed icon sets get multiplied in the backend: on the plugin settings screen there's a long list of repeating list items, and the icon selector dialog itself lists the same icons multiple times.

To Reproduce Steps to reproduce the behavior:

  1. Install the Box Icons and Simple Icons sets
  2. Use the plugin - add icons to various Obsidian UI elements, folders etc.
  3. With time, you'll see that
    • the icon selector dialog loads slower and slower
    • the same icon selector dialog lists same icons multiple times - more and more times, probably depeding on how many times the dialog has been used
    • the plugin's settings screen show a long list of two items repeating over and over again

OS: Windows 11

Oddward commented 8 months ago

are the icons duplicated in the icons folder? i.e. /.obsidian/icons

lunule commented 8 months ago

Funny thing is that the icon files themselves are not duplicated.

The path is .obsidian/icons/, and when I check in, I see the two icons folders, and the two zipped packages the plugin downloaded and unpacked.

There's no problem with the number of icon files within the icon folders either.

The issue only persists in the Obsidian UI

FitzFrobozz commented 7 months ago

Just want to add that when you attempt to remove a duplicate, both instances disappear from settings and the files themselves are deleted from <vaultname>/.obsidian/icons. obsidian-issue-iconize-iconlib-dupe

Also, I noticed that when adding an icon set via the file system as opposed to settings (i.e. close Obsidian, place a zip file into <vaultname>/.obsidian/icons, relaunch Obsidian) the same settings duplicate issue occurs.