micah686/VnManager

create category alphanumeric check not counting characters

Omar-Abdul-Azeez opened this issue · 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

var minimumLetters = input.Count(char.IsLetter);

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...

gameCount = db.GetCollection<UserDataGames>(DbUserData.UserData_Games.ToString()).Count();

shouldn't this be .Query().toList().Count()?

  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

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

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