mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-12 17:57:29 +00:00
close #1555
This commit is contained in:
parent
d106ac5c0a
commit
2082c97ed6
@ -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:
|
||||
|
@ -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…
Reference in New Issue
Block a user