Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HealsCodes opened this issue Jun 14, 2024 · 3 comments · Fixed by #722
Open

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

HealsCodes opened this issue Jun 14, 2024 · 3 comments · Fixed by #722

Comments

@HealsCodes
Copy link

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 added a commit to UInt2048/tsurukame that referenced this issue Jun 21, 2024
user.currentLevel is capped at maxLevelGrantedBySubscription which causes davidsansome#719 due to an implementation oversight
@UInt2048
Copy link
Contributor

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

davidsansome pushed a commit that referenced this issue Jun 21, 2024
user.currentLevel is capped at maxLevelGrantedBySubscription which causes #719 due to an implementation oversight
@UInt2048
Copy link
Contributor

UInt2048 commented Jun 21, 2024

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

func getAssignmentsAtUsersCurrentLevel() -> [TKMAssignment] {
guard let userInfo = getUserInfo() else {
return []
}
return getAssignments(level: Int(userInfo.level))
}

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
Copy link
Owner

@UInt2048 Ah thanks for letting me know. I've reverted c22a914 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants