@@ -53,12 +53,12 @@ import androidx.compose.ui.unit.sp
5353import androidx.lifecycle.compose.collectAsStateWithLifecycle
5454import org.koin.compose.viewmodel.koinViewModel
5555import org.mifospay.core.common.CurrencyFormatter
56- import org.mifospay.core.common.DateHelper
5756import org.mifospay.core.designsystem.component.MifosScaffold
5857import org.mifospay.core.designsystem.icon.MifosIcons
5958import org.mifospay.core.ui.AvatarBox
6059import template.core.base.designsystem.theme.KptTheme
6160
61+ // TODO make the topbar back button consistent with other screens
6262@Composable
6363fun PaymentChatHistoryScreen (
6464 onBackClick : () -> Unit ,
@@ -143,7 +143,7 @@ private fun UserProfileTopBar(
143143 Text (
144144 text = if (userType == UserType .BUSINESS ) businessName else bankingName,
145145 style = KptTheme .typography.titleMedium,
146- fontWeight = FontWeight .SemiBold ,
146+ fontWeight = FontWeight .Medium ,
147147 color = KptTheme .colorScheme.onSurface,
148148 )
149149
@@ -226,7 +226,7 @@ private fun PaymentHistoryGroup(
226226 }
227227
228228 if (transaction != group.transactions.last()) {
229- Spacer (modifier = Modifier .height(8 .dp))
229+ Spacer (modifier = Modifier .height(16 .dp))
230230 }
231231 }
232232 }
@@ -258,13 +258,9 @@ private fun PaymentCard(
258258 .padding(16 .dp),
259259 ) {
260260 Text (
261- text = if (transaction.isSent) {
262- " Payment to ${getFirstName(transaction.recipientName)} "
263- } else {
264- " Payment from ${getFirstName(transaction.recipientName)} "
265- },
261+ text = " Payment to ${getFirstName(transaction.recipientName)} " ,
266262 style = KptTheme .typography.titleMedium,
267- fontWeight = FontWeight .SemiBold ,
263+ fontWeight = FontWeight .Medium ,
268264 color = KptTheme .colorScheme.onSurface,
269265 )
270266
@@ -281,7 +277,7 @@ private fun PaymentCard(
281277 Text (
282278 text = formatAmount(transaction.amount),
283279 style = KptTheme .typography.headlineSmall,
284- fontWeight = FontWeight .SemiBold ,
280+ fontWeight = FontWeight .Medium ,
285281 color = KptTheme .colorScheme.onSurface,
286282 )
287283
@@ -304,7 +300,7 @@ private fun PaymentCard(
304300 Text (
305301 text = " Paid - ${formatPaymentDate(transaction.paymentDate)} " ,
306302 style = KptTheme .typography.bodyMedium,
307- fontWeight = FontWeight .SemiBold ,
303+ fontWeight = FontWeight .Medium ,
308304 color = KptTheme .colorScheme.onSurfaceVariant,
309305 )
310306 }
@@ -350,7 +346,7 @@ private fun PaymentActionBar(
350346 Text (
351347 text = " Pay" ,
352348 style = KptTheme .typography.titleMedium,
353- fontWeight = FontWeight .SemiBold ,
349+ fontWeight = FontWeight .Medium ,
354350 )
355351 }
356352
@@ -435,18 +431,6 @@ private fun MessageInput(
435431 }
436432}
437433
438- private fun formatGroupDate (dateString : String ): String {
439- return try {
440- // Parse the date string (e.g., "27 Aug 2025") and add current time
441- val currentDate = DateHelper .currentDate
442- val time = " ${currentDate.hour.toString().padStart(2 , ' 0' )} :${currentDate.minute.toString().padStart(2 , ' 0' )} "
443- val amPm = if (currentDate.hour < 12 ) " am" else " pm"
444- " $dateString , $time $amPm "
445- } catch (e: Exception ) {
446- dateString
447- }
448- }
449-
450434private fun formatPaymentDate (dateString : String ): String {
451435 return try {
452436 // Extract day, month, and year from the date string (e.g., "25 Sep 2023")
0 commit comments