Skip to content

Fix timeboxing and clean up old session code#36

Merged
flerda merged 1 commit intoflerda:v2.1-devfrom
hssm:timebox
Jan 29, 2013
Merged

Fix timeboxing and clean up old session code#36
flerda merged 1 commit intoflerda:v2.1-devfrom
hssm:timebox

Conversation

@hssm
Copy link
Copy Markdown

@hssm hssm commented Jan 27, 2013

These changes update the timeboxing behaviour so it works like on the desktop client and fixes Issue 1355.

Since sessions were removed in Anki 2 and timeboxing was closely related to that feature in the old version, I've taken the opportunity to remove anything related to sessions as well. I've left some of the studyoptions_* strings since I think they might be of use as filtering selections later on.

One thing to note about this commit:
The rep count is incremented whenever the next card is fetched, which can be seen in DeckTask.doInBackgroundAnswerCard(). That's good so far. However, AnkiDroid appears to answer a "dummy" card when it first starts a review session (see the end of Reviewer.onCreate()). This prematurely increments the rep count, resulting in the first timebox being 1 more than it actually is and having one less rep for the final rep.

In both cases, I've manually accounted for the extra and missing reps at the start and end. It doesn't feel like the best solution, but it's the simplest I could come up with.

@ghost ghost assigned flerda Jan 29, 2013
@flerda
Copy link
Copy Markdown
Owner

flerda commented Jan 29, 2013

Thanks.
I agree that the extra increment and decrement are a bit odd looking, but that should do it for now.
Maybe a solution would be to increment on answering the card instead of showing the next one?

flerda added a commit that referenced this pull request Jan 29, 2013
Fix timeboxing and clean up old session code.
@flerda flerda merged commit d8cd270 into flerda:v2.1-dev Jan 29, 2013
@hssm
Copy link
Copy Markdown
Author

hssm commented Jan 29, 2013

I'll try to think of a way to do it without those manual +/- reps. I think it does increment on answering but the initial dummy card is skewing the rep count. It might just be a matter of starting the timebox counter after that point.

@flerda
Copy link
Copy Markdown
Owner

flerda commented Jan 29, 2013

Feel free to get in touch if you want to discuss a possible solution at some point.
The extra dummy card might also not be necessary... I think I ran into trouble because of it before!

@hssm hssm deleted the timebox branch February 8, 2013 08:54
flerda added a commit that referenced this pull request Apr 20, 2013
Add Travis CI build status to README file.
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