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

Incorrect information about new cards in deck if > 1000 in 'Custom study/increase today's...' #5197

Closed
wujek-srujek opened this issue Jan 8, 2019 · 8 comments

Comments

@wujek-srujek
Copy link

Reproduction Steps
  1. Make sure there are > 1000 new cards in a deck.
  2. Long-press the deck, choose 'Custom study', then 'Increase today's new card limit'
Expected Result

The dialog shows the correct amount of new cards (3250 in my case) or (just like Anki Desktop 2.1.7, Mac Os) '1000+'.

Actual Result

The dialog says: 'New cards in deck: 1000', which is simply not true (made me go re-check if my import worked correctly).

[x] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid

[x] I have checked the manual and the FAQ and could not find a solution to my issue

[x] I have searched for similar existing issues here and on the user forum

@mikehardy
Copy link
Member

This seems related to #5092 - @timrae we appear to have a small infestation of "1000 plus sign or not" bugs

I guess we might have a formatting / run out of screen space issue if we show the actual number as opposed to limiting it to 4 digits plus a + sign, maybe that's why it is limited to 1000+? But maybe it should go as high as 9999+ then?

How many decks are there with more than 99,999 cards (the space taken by 4 digits and a plus sign)? i.e., is this ever actually a screen real estate issue? If not, then I think we should just show the number - I prefer precision more than vaguery personally even if this breaks with Anki Desktop

@mikehardy
Copy link
Member

@wujek-srujek pay attention in the next alpha after today, this may be resolved for you

@malnvenshorn
Copy link
Contributor

malnvenshorn commented Jun 21, 2019

@mikehardy if it's just a display issue the limit should not be in scheduler but rather when setting the text view, e.g. max(count, 99999). Setting the limit in the scheduler means that the returned values might be wrong.

@mikehardy
Copy link
Member

While true, we keep the scheduler etc as close the the desktop code as possible, if this would break compatibility - even in ways of display - we'll typically do the same thing unless we consider it carefully like in the case of even displaying more than 1000. That said, I would assume desktop does show correct return values or that our changes will do the same. If it does not, open an issue

@malnvenshorn
Copy link
Contributor

If you're already deviating by changing the value to 99999 why not setting it to -1? This shouldn't limit the results. The view can then be set by max(count, 1000) or count > 1000 ? "1000+" : count (don't now how it is displayed in the desktop version).

I'm not proposing this without an ulterior motive 😉 For my implementation of the progress bar I need the correct values. Workaround for now writing own methods without the limit (duplicated code)

@mikehardy
Copy link
Member

mikehardy commented Jun 21, 2019

Oh yeah - I was going to propose that you make a PR, but you are working on one ;-). You are likely closer to the code than I am, if it is something your PR changes or needs, have an opinion on it (in an engineering sense that is: take a defensible stance with your code) and propose it as part of your changes?

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2020

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@david-allison
Copy link
Member

Fixed

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

No branches or pull requests

4 participants