mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
Desktop has had a search history since the advanced bar was written. Android had none, for no reason other than where the code sat — and an empty search box on Android rendered nothing at all, which is the one place a reader's last searches are worth offering. The behaviour came over with `SearchHistory`; what is added here is Android's half. `DataStoreSearchHistoryStorage` is the file the two strings live in — device-global like the drawer's collapse state, since what you searched for is a property of this phone and is never published to a relay. The empty box now lists the recent searches, each one tap from being re-run: an entry is stored as the same text the box holds, so putting it back in the field is the whole of loading it. Recorded on the Enter key rather than on every pause in typing. The field already had an `onSubmit` slot that nothing on Android was passing; recording every settled query would fill the list with the prefixes of the word being typed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DWTxEzzvD3mKkkgE4N7H66