fix: title of app bar fixed
This commit is contained in:
@@ -87,8 +87,9 @@ class DrugDetailParser {
|
||||
private fun extractPersianName(document: Document): String {
|
||||
val titleElement = document.select("h1.EnglishNumericFont").first()
|
||||
val fullText = titleElement?.text() ?: ""
|
||||
// Remove the suffix "چیست و برای چه مواردی استفاده می شود؟"
|
||||
return fullText.replace(Regex("\\s*چیست و برای چه مواردی استفاده می شود\\?\\s*"), "").trim()
|
||||
val regexFullText = fullText.replace(Regex("\\s*چیست و برای چه مواردی استفاده می شود؟\\s*"), "").trim()
|
||||
println("regexFullText: $regexFullText")
|
||||
return regexFullText
|
||||
}
|
||||
|
||||
private fun extractEnglishName(document: Document): String {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.approagency.drug.presentation.screens
|
||||
|
||||
import android.R
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
@@ -83,10 +84,8 @@ fun DrugDetailScreen(
|
||||
is DrugDetailYabState.Success -> {
|
||||
Column {
|
||||
Text(
|
||||
text = state.drugDetail.persianName.take(25),
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
maxLines = 1
|
||||
text = state.drugDetail.persianName,
|
||||
style = MaterialTheme.typography.titleMedium
|
||||
)
|
||||
if (state.drugDetail.englishName.isNotEmpty()) {
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user