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

fix: use 0 as last chance lastVersion fallback for limiter #1236

Closed
wants to merge 1 commit into from

Conversation

mikehardy
Copy link
Contributor

This is a speculative fix for #1233 ankidroid/Anki-Android#14348

I'm not sure if 1) this is valid kotlin (I just tapped it out in the github web UI or 2) if I'm understanding the problem correctly

It is confusing to me how this (exception apparently from the original catch block...) could happen. I don't understand that and may be missing something simple

But if we end up in that catch block and then for whatever reason cannot go from Long to Integer, then at the very least we can avoid crashing an app on startup by simply using zero (or backup value in any case...) as a final "well, at least we tried..." value

I have no pride in the code or thought behind the solution, if it's terrible, close and we can all forget about it ;-). Would love to see #1233 fixed though

F43nd1r added a commit that referenced this pull request Sep 1, 2023
@F43nd1r F43nd1r closed this Sep 1, 2023
@mikehardy mikehardy deleted the patch-2 branch September 3, 2023 23:18
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 this pull request may close these issues.

2 participants