davidsansome / tsurukame

Tsurukame is an unofficial WaniKani app for iOS. It helps you learn Japanese Kanji.
https://tsurukame.app
Apache License 2.0
249 stars 58 forks source link

Finishing Level 3 on a free account results in wrong graph display #719

Open HealsCodes opened 3 weeks ago

HealsCodes commented 3 weeks ago

I just hit the end of level 3 on my free account but still have some vocabulary and even one kanji left to learn.

WaniKani shows me as 'level 4' but still lets me finish off level 3. Tsurukame on the other hand shows me as 'level 4' in the top bar with a 'current level 2' graph and empty 'level 3' graph below.

See the screenshot for better understanding: image

UInt2048 commented 2 weeks ago

@HealsCodes Nice find!

I've proposed #722 which I believe would display just the level 3 graph (the level 4 graph being useless as it is locked).

UInt2048 commented 2 weeks ago

@davidsansome FYI I was wrong about my assumption because getAssignmentsAtUsersCurrentLevel apparently uses user.level instead of user.currentLevel, so it will now only display the level 4 graph, and not the more useful level 3 graph.

https://github.com/davidsansome/tsurukame/blob/4369ee6e2702bd12bbf8b36b178fe7527e3cf6e0/ios/LocalCachingClient.swift#L533-L538

You can delete line 237 from the main view controller if you want or change the behavior of this function, but I'm not going to test this because this might affect people on monthly subscriptions whose subscriptions have lapsed (e.g. level 23 and then the max level granted becomes 3 again)

davidsansome commented 4 days ago

@UInt2048 Ah thanks for letting me know. I've reverted c22a914649591f0864c3ef5828ea2b0a95f9b16a for now and reopened this bug. I guess we'll have to test it properly by levelling up a new free account to level 3 and seeing what happens.