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 filtered deck ordering of intraday learning cards and reviews #2828

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

abdnh
Copy link
Collaborator

@abdnh abdnh commented Nov 14, 2023

Closes #2812

@@ -121,7 +121,7 @@ impl Collection {
format!("({})", term.search)
}
);
let order = order_and_limit_for_search(term, ctx.today);
let order = order_and_limit_for_search(term, ctx.today, self.storage.creation_stamp()?.0);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is only 100% accurate in V1, and we need to get this from the SchedTimingToday calculations in timing.rs instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the current approach won't handle the rollover correctly. Please use .days_elapsed instead (eg (due - {days_elapsed}) * 86400 + {current_timestamp})

@dae
Copy link
Member

dae commented Nov 14, 2023

Thanks Abdo!

@dae dae merged commit d752a43 into ankitects:main Nov 14, 2023
@abdnh abdnh deleted the filtered-due-order branch November 14, 2023 05:26
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.

Filtered deck ordering surprising when a mix of intraday learning cards and reviews
2 participants