Browse Source

close #1555

renovate/androidx.fragment-fragment-ktx-1.x
Austin Huang 4 years ago
parent
commit
2082c97ed6
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 1
      app/src/main/java/awais/instagrabber/fragments/search/SearchFragment.java
  2. 2
      app/src/main/java/awais/instagrabber/viewmodels/SearchFragmentViewModel.java

1
app/src/main/java/awais/instagrabber/fragments/search/SearchFragment.java

@ -239,6 +239,7 @@ public class SearchFragment extends Fragment implements SearchCategoryFragment.O
switch (resource.status) {
case SUCCESS:
viewModel.search("", type);
viewModel.search("", FavoriteType.TOP);
liveData.removeObserver(this);
break;
case ERROR:

2
app/src/main/java/awais/instagrabber/viewmodels/SearchFragmentViewModel.java

@ -242,7 +242,7 @@ public class SearchFragmentViewModel extends AppStateViewModel {
@Override
public void onFailure(@NonNull final Throwable t) {
if (!TextUtils.isEmpty(tempQuery)) return;
topResults.postValue(Resource.success(Collections.emptyList()));
liveData.postValue(Resource.success(Collections.emptyList()));
Log.e(TAG, "onFailure: ", t);
}
}, AppExecutors.INSTANCE.getMainThread());

Loading…
Cancel
Save