federicoiosue / Omni-Notes

Open source note-taking application for Android
https://omninotes.app
GNU General Public License v3.0
2.69k stars 1.1k forks source link

Incorrect Prompt Displayed When Deleting Categories without notes #945

Closed XYIheng closed 9 months ago

XYIheng commented 10 months ago

Description:

When attempting to delete a category that contains no notes, the app erroneously displays a prompt indicating that this category is used by some notes.

I think if there are no notes under the category, the prompt shouldn't be displayed. Because the prompt indicates that there are notes in the category.

Reproduce steps:

  1. create a new category 'A' in one note
  2. assign the note to another category. (so there is no note under the category 'A' )
  3. delete the category 'A'
  4. see the error: a prompt displays

Expected behavior:

If there are no notes under the category, then the prompt should not display

Bug video:

https://github.com/federicoiosue/Omni-Notes/assets/31406320/b93543df-bff2-4626-9c74-9d84b9e812a2

Environment: Omninotes Version: 6.3.0Alpha

XYIheng commented 9 months ago

Thanks for your fix!