mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-26 16:04:07 +08:00
reset the adapter on new query
This commit is contained in:
parent
d5cffddc72
commit
d285115090
@ -48,6 +48,8 @@ public class ExploreRepositoriesFragment extends Fragment {
|
|||||||
private String sort = "updated";
|
private String sort = "updated";
|
||||||
private String order = "asc";
|
private String order = "asc";
|
||||||
|
|
||||||
|
private ExploreRepositoriesAdapter adapter;
|
||||||
|
|
||||||
private OnFragmentInteractionListener mListener;
|
private OnFragmentInteractionListener mListener;
|
||||||
|
|
||||||
public ExploreRepositoriesFragment() {
|
public ExploreRepositoriesFragment() {
|
||||||
@ -99,6 +101,7 @@ public class ExploreRepositoriesFragment extends Fragment {
|
|||||||
if (actionId == EditorInfo.IME_ACTION_SEND) {
|
if (actionId == EditorInfo.IME_ACTION_SEND) {
|
||||||
if(!searchKeyword.getText().toString().equals("")) {
|
if(!searchKeyword.getText().toString().equals("")) {
|
||||||
mProgressBar.setVisibility(View.VISIBLE);
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
|
mRecyclerView.setVisibility(View.GONE);
|
||||||
loadSearchReposList(instanceUrl, instanceToken, loginUid, searchKeyword.getText().toString(), repoTypeInclude, sort, order, getContext());
|
loadSearchReposList(instanceUrl, instanceToken, loginUid, searchKeyword.getText().toString(), repoTypeInclude, sort, order, getContext());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,7 +150,9 @@ public class ExploreRepositoriesFragment extends Fragment {
|
|||||||
|
|
||||||
private void getReposList(List<UserRepositories> dataList, Context context) {
|
private void getReposList(List<UserRepositories> dataList, Context context) {
|
||||||
|
|
||||||
ExploreRepositoriesAdapter adapter = new ExploreRepositoriesAdapter(dataList, context);
|
adapter = new ExploreRepositoriesAdapter(dataList, context);
|
||||||
|
|
||||||
|
mRecyclerView.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
mRecyclerView.setHasFixedSize(true);
|
mRecyclerView.setHasFixedSize(true);
|
||||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
Loading…
Reference in New Issue
Block a user