Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with
2 additions and
1 deletions
-
app/src/main/java/awais/instagrabber/fragments/search/SearchFragment.java
-
app/src/main/java/awais/instagrabber/viewmodels/SearchFragmentViewModel.java
|
@ -239,6 +239,7 @@ public class SearchFragment extends Fragment implements SearchCategoryFragment.O |
|
|
switch (resource.status) { |
|
|
switch (resource.status) { |
|
|
case SUCCESS: |
|
|
case SUCCESS: |
|
|
viewModel.search("", type); |
|
|
viewModel.search("", type); |
|
|
|
|
|
viewModel.search("", FavoriteType.TOP); |
|
|
liveData.removeObserver(this); |
|
|
liveData.removeObserver(this); |
|
|
break; |
|
|
break; |
|
|
case ERROR: |
|
|
case ERROR: |
|
|
|
@ -242,7 +242,7 @@ public class SearchFragmentViewModel extends AppStateViewModel { |
|
|
@Override |
|
|
@Override |
|
|
public void onFailure(@NonNull final Throwable t) { |
|
|
public void onFailure(@NonNull final Throwable t) { |
|
|
if (!TextUtils.isEmpty(tempQuery)) return; |
|
|
if (!TextUtils.isEmpty(tempQuery)) return; |
|
|
topResults.postValue(Resource.success(Collections.emptyList())); |
|
|
|
|
|
|
|
|
liveData.postValue(Resource.success(Collections.emptyList())); |
|
|
Log.e(TAG, "onFailure: ", t); |
|
|
Log.e(TAG, "onFailure: ", t); |
|
|
} |
|
|
} |
|
|
}, AppExecutors.INSTANCE.getMainThread()); |
|
|
}, AppExecutors.INSTANCE.getMainThread()); |
|
|