1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-23 05:16:58 +00:00
This commit is contained in:
Austin Huang 2021-07-09 16:49:50 -04:00
parent d106ac5c0a
commit 2082c97ed6
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 2 additions and 1 deletions

View File

@ -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:

View File

@ -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());