Removes the element that was forcing everything to be right aligned

This commit is contained in:
Vitor Pamplona 2023-03-03 18:14:51 -05:00
parent 5f98a54452
commit ea905ef6ed
2 changed files with 3 additions and 5 deletions

View File

@ -46,7 +46,7 @@ fun ExpandableRichTextViewer(
val text = if (showFullText) content else content.take(350)
Box(contentAlignment = Alignment.BottomCenter) {
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) {
//CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) {
RichTextViewer(
text,
canPreview,
@ -56,7 +56,7 @@ fun ExpandableRichTextViewer(
accountViewModel,
navController
)
}
//}
if (content.length > 350 && !showFullText) {
Row(

View File

@ -133,9 +133,7 @@ fun RichTextViewer(
// FlowRow doesn't work well with paragraphs. So we need to split them
content.split('\n').forEach { paragraph ->
FlowRow() {
// Did not work: if (isArabic(paragraph)) paragraph.split(' ').reversed() else
// English is not Right side
val s = paragraph.split(' ');
val s = if (isArabic(paragraph)) paragraph.split(' ').reversed() else paragraph.split(' ');
s.forEach { word: String ->
if (canPreview) {
// Explicit URL