Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Modify `findNotes()` to use V16 `searchNotes()` function

Open viciousAegis opened this issue 2 years ago • 1 comments

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.

  • [x] You have not changed whitespace unnecessarily (it makes diffs hard to read)
  • [x] You have a descriptive commit message with a short title (first line, max 50 chars).
  • [x] Your code follows the style of the project (e.g. never omit braces in if statements)
  • [x] You have commented your code, particularly in hard-to-understand areas
  • [x] 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 avatar Jul 23 '22 09:07 viciousAegis

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

Arthur-Milchior avatar Jul 24 '22 13:07 Arthur-Milchior

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

mikehardy avatar Aug 18 '22 20:08 mikehardy

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!

github-actions[bot] avatar Oct 08 '22 23:10 github-actions[bot]