Skip to content

Conversation

@david-allison
Copy link
Member

@david-allison david-allison commented Jan 18, 2026

Purpose / Description

Part of #18709: to be used in the new material SearchView

Approach

  • Define an MRU list
  • Test it

SharedPreferences are used as they're a common AnkiDroid abstraction.

I defined a new .xml file, as the key was not a preference key

How Has This Been Tested?

Unit tested

Learning (optional, can help others)

Anki uses 30 elements

https://github.com/ankitects/anki/blob/e9cc65569807771f548fc9c2634aabc7b2f90ed2/qt/aqt/browser/browser.py#L541

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • 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

@david-allison david-allison force-pushed the search-history branch 5 times, most recently from 5c60da1 to 0ce8a4d Compare January 18, 2026 20:21
@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Jan 19, 2026
@david-allison david-allison removed the Needs Author Reply Waiting for a reply from the original author label Jan 19, 2026
Copy link
Member

@lukstbit lukstbit 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, some minor questions.

`SharedPreferences` are used as they're a common AnkiDroid abstraction.

I defined a new `.xml` file, as the key was not a preference key

A JSON Object enables adding properties at a later date

Part of 18709: to be used in the new material
SearchView
Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

Questions answered, LGTM.

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jan 20, 2026
Copy link
Member

@BrayanDSO BrayanDSO left a comment

Choose a reason for hiding this comment

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

okey dokey

@BrayanDSO BrayanDSO added this pull request to the merge queue Jan 20, 2026
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Jan 20, 2026
Merged via the queue into ankidroid:main with commit 0c3f79f Jan 21, 2026
15 checks passed
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Jan 21, 2026
@github-actions github-actions bot added this to the 2.24 release milestone Jan 21, 2026
@david-allison
Copy link
Member Author

Thanks so much!!!! Just got this working on my Dev branch

@david-allison david-allison deleted the search-history branch January 21, 2026 01:07
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.

3 participants