VnManager icon indicating copy to clipboard operation
VnManager copied to clipboard

create category alphanumeric check not counting characters

Open Omar-Abdul-Azeez opened this issue 3 years ago • 3 comments

3 letters minimum? why tho? 1 letter categories aren't bad... in my case I want to make an "H" category for eroge novels However... I believe this line was forgotten lol https://github.com/micah686/VnManager/blob/1f47add17f73588c1c7ee7611ea5559b664a558c/src/VnManager/ViewModels/Dialogs/ModifyGame/ModifyGameCategoriesViewModel.cs#L368

I have 0 experience in C# but taking a look at the other method calls and after googling for a bit I think it should be input.Count(x => char.isLetter(x))

also I noticed that the games aren't being counted... https://github.com/micah686/VnManager/blob/1f47add17f73588c1c7ee7611ea5559b664a558c/src/VnManager/ViewModels/UserControls/MainGridViewModel.cs#L68 shouldn't this be .Query().toList().Count()?

Omar-Abdul-Azeez avatar Mar 20 '21 00:03 Omar-Abdul-Azeez

  1. The current version of the input.Count() works just fine, even though the x => ... would work fine.
  2. No, I don't need the .Query, because I just need the count. The db.GetCollection<T>() returns an ILiteCollection, which is enough for me to get a count.

I'm not sure if I'll decrease the category minimum to 2 or less

micah686 avatar Mar 20 '21 03:03 micah686

well, I was having an issue with both of these... category just seems to start working now... I tried restarting the program and it didn't fix it but now it fixed without restarting ._. the game count still doesn't work tho it always shows 0 games... still I have no knowledge in C# but it seems I was looking in the wrong file... whoops... I have other issues on my end like traits weren't appearing as well but now they are... I think the most likely cause is not restarting after installing .NET core... I'll try that to see if it fixes it

edit: I just tried it but no luck... I added 2 games and the counter still shows 0... I also noticed that characters that share more than one game only get mentioned in one of them... in the same way student club president heroine tag that is a child of setting and theme and character only getting grouped in the setting tags

and after fiddling with the categories I thought of a case that might not work as expected... and well it didn't...

  1. create a category
  2. add it to a game
  3. delete the category (globally not from the added game)
  4. create the category again with the same name
  5. the previously added game is found in the newly created category

Omar-Abdul-Azeez avatar Mar 20 '21 10:03 Omar-Abdul-Azeez

The category issue was caused by me not clearing out the categories from the games. Fixed in 024f76861621c980829fd9cf7c148080a295f375 Should also be fixed in the next release.

micah686 avatar Mar 21 '21 04:03 micah686