fixed bug again

This commit is contained in:
Alex
2026-04-09 15:37:24 -06:00
parent bc55580831
commit 3db45bde6c
2 changed files with 3 additions and 3 deletions

View File

@@ -210,7 +210,7 @@ public class AdoptionFragment extends Fragment implements AdoptionAdapter.OnAdop
if (status.equals("All Statuses")) status = null;
else status = status.toUpperCase();
viewModel.loadAdoptions(true, query, status, storeId);
viewModel.loadAdoptions(true, query, status, storeId, selectedDateString, null);
}
private void openDetail(int position) {

View File

@@ -42,7 +42,7 @@ public class AdoptionListViewModel extends ViewModel {
public LiveData<Boolean> getIsLoading() { return isLoading; }
public boolean isLastPage() { return isLastPage; }
public void loadAdoptions(boolean reset, String query, String status, Long storeId) {
public void loadAdoptions(boolean reset, String query, String status, Long storeId, String date, Long employeeId) {
if (isLoading.getValue() != null && isLoading.getValue() && !reset) return;
if (reset) {
@@ -53,7 +53,7 @@ public class AdoptionListViewModel extends ViewModel {
if ("All Statuses".equals(status)) status = null;
isLoading.setValue(true);
adoptionRepository.getAllAdoptions(currentPage, PAGE_SIZE, query, status, storeId, "adoptionDate,desc", null).observeForever(resource -> {
adoptionRepository.getAllAdoptions(currentPage, PAGE_SIZE, query, status, storeId, date, employeeId).observeForever(resource -> {
if (resource != null) {
if (resource.status == Resource.Status.SUCCESS && resource.data != null) {
List<AdoptionDTO> currentList = reset ? new ArrayList<>() : new ArrayList<>(adoptions.getValue());