Fixes #5344 Some categories hidden at top of Upload Wizard suggestions, need to manually scroll up (#5370)

* Fix Issue #5344

* fix update Issue #5344

* Add Comment
This commit is contained in:
HNYDDDTONY-ANU 2023-11-02 00:25:07 +11:00 committed by GitHub
parent b7913fa027
commit 6f96e8959b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 1 deletions

View file

@ -198,6 +198,22 @@ public class UploadCategoriesFragment extends UploadBaseFragment implements Cate
} else {
adapter.setItems(categories);
}
adapter.notifyDataSetChanged();
// Nested waiting for search result data to load into the category
// list and smoothly scroll to the top of the search result list.
rvCategories.post(new Runnable() {
@Override
public void run() {
rvCategories.smoothScrollToPosition(0);
rvCategories.post(new Runnable() {
@Override
public void run() {
rvCategories.smoothScrollToPosition(0);
}
});
}
});
}
@Override

View file

@ -246,7 +246,21 @@ public class DepictsFragment extends UploadBaseFragment implements DepictsContra
adapter.setItems(depictedItemList);
}
}
depictsRecyclerView.smoothScrollToPosition(0);
// Nested waiting for search result data to load into the depicted item
// list and smoothly scroll to the top of the search result list.
depictsRecyclerView.post(new Runnable() {
@Override
public void run() {
depictsRecyclerView.smoothScrollToPosition(0);
depictsRecyclerView.post(new Runnable() {
@Override
public void run() {
depictsRecyclerView.smoothScrollToPosition(0);
}
});
}
});
}
/**