From a08c0af03a074a11377a430b234965cf8f96785a Mon Sep 17 00:00:00 2001 From: Veirt Date: Thu, 12 Dec 2024 19:50:33 +0800 Subject: [PATCH] fix: get learner name when navigating to chat from tutor home --- .../main/tutor/home/adapter/HomeScheduledSessionsAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/tutortoise/tutortoise/presentation/main/tutor/home/adapter/HomeScheduledSessionsAdapter.kt b/app/src/main/java/com/tutortoise/tutortoise/presentation/main/tutor/home/adapter/HomeScheduledSessionsAdapter.kt index 04f7a5f..237b797 100644 --- a/app/src/main/java/com/tutortoise/tutortoise/presentation/main/tutor/home/adapter/HomeScheduledSessionsAdapter.kt +++ b/app/src/main/java/com/tutortoise/tutortoise/presentation/main/tutor/home/adapter/HomeScheduledSessionsAdapter.kt @@ -16,7 +16,7 @@ import com.tutortoise.tutortoise.utils.isoToReadableTime class HomeScheduledSessionsAdapter( private var items: List, - private val onChatClick: (String) -> Unit + private val onChatClick: (String, String) -> Unit ) : RecyclerView.Adapter() { private var lastAnimatedPosition = -1 @@ -122,7 +122,7 @@ class HomeScheduledSessionsAdapter( .circleCrop() .into(ivProfilePicture) - btnChat.setOnClickListener { onChatClick(order.learnerId) } + btnChat.setOnClickListener { onChatClick(order.learnerId, order.learnerName) } } } }