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

Modify findNotes() to use V16 searchNotes() function #11908

Merged
merged 4 commits into from Aug 18, 2022

Conversation

viciousAegis
Copy link
Member

@viciousAegis viciousAegis commented Jul 23, 2022

Modify SearchNotes to be able to use both legacy and V16 functions

Pull Request template

Purpose / Description

Add support for using new backend method searchNotes()

Approach

By checking the schema version, the newer function is used on using V16. The newer searchNotes() function includes a parameter for sorting, which is not supported in legacy.

findNotes() function is modified in Collection so that V16 can be used when enabled

How Has This Been Tested?

On my phone by enabling V16 backend in settings.

Checklist

Please, go through these checks before submitting the PR.

  • You have not changed whitespace unnecessarily (it makes diffs hard to read)
  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • Your code follows the style of the project (e.g. never omit braces in if statements)
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@viciousAegis viciousAegis added the Review High Priority Request for high priority review label Jul 23, 2022
@Arthur-Milchior
Copy link
Member

Arthur-Milchior commented Jul 24, 2022

As a side note, I'd appreciate if you could remove part of the template that you don't fill, just so that I know what not to read and what information is relevant. Or ideally, fill it, e.g. to note that you can't test it in practice due to use of V16

Modify SearchNotes to be able to use both legacy and V16 functions
Modify SearchNotes to be able to use both legacy and V16 functions

change ordering key for notes, and use JvmOverloads instead of overriding
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

Looks good to me, I'd like a look from @dae now
Also, not sure if this idea excites you or not @viciousAegis but I'd love for the V16 developer setting to be turned in to a toggle + preference for persistence as a separate thing. I believe we are at the point where easier testing would be a good idea, then hopefully near future we can move it from developer area to advanced

@mikehardy mikehardy requested a review from dae July 30, 2022 19:22
@mikehardy mikehardy added the Needs Second Approval Has one approval, one more approval to merge label Jul 30, 2022
# Conflicts:
#	AnkiDroid/src/main/java/com/ichi2/libanki/Collection.kt
#	AnkiDroid/src/main/java/com/ichi2/libanki/CollectionV16.kt
@viciousAegis viciousAegis requested a review from dae August 10, 2022 05:22
@mikehardy mikehardy added the squash-merge The pull request currently requires maintainers to "Squash Merge" label Aug 18, 2022
@mikehardy
Copy link
Member

Verified both of dae's comments are addressed, thanks all for the review and @viciousAegis for the work - 🚀

@mikehardy mikehardy added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Review High Priority Request for high priority review Needs Second Approval Has one approval, one more approval to merge labels Aug 18, 2022
@mikehardy mikehardy merged commit a2eef40 into ankidroid:main Aug 18, 2022
@github-actions github-actions bot added this to the 2.16 release milestone Aug 18, 2022
@github-actions github-actions bot removed Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) squash-merge The pull request currently requires maintainers to "Squash Merge" labels Aug 18, 2022
@viciousAegis viciousAegis deleted the findNotesV16 branch August 19, 2022 03:24
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2022

Hi there @viciousAegis! This is the OpenCollective Notice for PRs merged from 2022-08-01 through 2022-08-31

If you are interested in compensation for this work, the process with details is here:

https://github.com/ankidroid/Anki-Android/wiki/OpenCollective-Payment-Process#how-to-get-paid

We only post one comment per person per month to avoid spamming you, regardless of the number of PRs merged, but this note applies to all PRs merged for this month

Please note that GSoC contributions are okay for this process. Our philosophy is that our users have donated to AnkiDroid for all contributions. The only PRs that will not go through the OpenCollective process are ones directly related to am accepted GSoC project from a selected participant, since those receive a stipend from GSoC itself.

Please understand that our monthly budget is never guaranteed to cover all claims - the cap on payments-per-person may be lower, but we try to make our process as fair and transparent as possible, we just need your understanding.

Thanks!

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.

None yet

4 participants