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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Second Approval Has one approval, one more approval to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants