Merge branch '2126-scroll-search' into 'master'

Scroll to first item when search term changes

Closes #2126

See merge request fdroid/fdroidclient!1027
This commit is contained in:
Hans-Christoph Steiner 2021-06-16 09:32:49 +00:00
commit 345915cdf4

View File

@ -266,6 +266,7 @@ public class AppListActivity extends AppCompatActivity implements LoaderManager.
public void onSearchTermsChanged(@Nullable String category, @NonNull String searchTerms) {
this.category = category;
this.searchTerms = searchTerms;
appView.scrollToPosition(0);
getSupportLoaderManager().restartLoader(0, null, this);
if (TextUtils.isEmpty(searchTerms)) {
removeSavedSearchSettings(this, SEARCH_TERMS_KEY);