From bc555808318e491c663055a20755774a51b62063 Mon Sep 17 00:00:00 2001 From: Alex <78383757+Lextical@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:24:20 -0600 Subject: [PATCH] bug fix --- .../com/example/petstoremobile/dtos/ConversationDTO.java | 8 ++++++++ .../petstoremobile/viewmodels/AdoptionListViewModel.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/example/petstoremobile/dtos/ConversationDTO.java b/android/app/src/main/java/com/example/petstoremobile/dtos/ConversationDTO.java index 316aa467..3a7ea42e 100644 --- a/android/app/src/main/java/com/example/petstoremobile/dtos/ConversationDTO.java +++ b/android/app/src/main/java/com/example/petstoremobile/dtos/ConversationDTO.java @@ -12,6 +12,14 @@ public class ConversationDTO { public ConversationDTO() {} + public ConversationDTO(Long id, Long customerId, Long staffId, String lastMessage, String status) { + this.id = id; + this.customerId = customerId; + this.staffId = staffId; + this.lastMessage = lastMessage; + this.status = status; + } + public Long getId() { return id; } diff --git a/android/app/src/main/java/com/example/petstoremobile/viewmodels/AdoptionListViewModel.java b/android/app/src/main/java/com/example/petstoremobile/viewmodels/AdoptionListViewModel.java index 683c79b4..6ebe7a99 100644 --- a/android/app/src/main/java/com/example/petstoremobile/viewmodels/AdoptionListViewModel.java +++ b/android/app/src/main/java/com/example/petstoremobile/viewmodels/AdoptionListViewModel.java @@ -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").observeForever(resource -> { + adoptionRepository.getAllAdoptions(currentPage, PAGE_SIZE, query, status, storeId, "adoptionDate,desc", null).observeForever(resource -> { if (resource != null) { if (resource.status == Resource.Status.SUCCESS && resource.data != null) { List currentList = reset ? new ArrayList<>() : new ArrayList<>(adoptions.getValue());