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
@@ -46,7 +46,7 @@ fun ExpandableRichTextViewer(
val text = if (showFullText) content else content.take(350) val text = if (showFullText) content else content.take(350)
Box(contentAlignment = Alignment.BottomCenter) { Box(contentAlignment = Alignment.BottomCenter) {
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) { //CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) {
RichTextViewer( RichTextViewer(
text, text,
canPreview, canPreview,
@@ -56,7 +56,7 @@ fun ExpandableRichTextViewer(
accountViewModel, accountViewModel,
navController navController
) )
} //}
if (content.length > 350 && !showFullText) { if (content.length > 350 && !showFullText) {
Row( Row(
@@ -133,9 +133,7 @@ fun RichTextViewer(
// FlowRow doesn't work well with paragraphs. So we need to split them // FlowRow doesn't work well with paragraphs. So we need to split them
content.split('\n').forEach { paragraph -> content.split('\n').forEach { paragraph ->
FlowRow() { FlowRow() {
// Did not work: if (isArabic(paragraph)) paragraph.split(' ').reversed() else val s = if (isArabic(paragraph)) paragraph.split(' ').reversed() else paragraph.split(' ');
// English is not Right side
val s = paragraph.split(' ');
s.forEach { word: String -> s.forEach { word: String ->
if (canPreview) { if (canPreview) {
// Explicit URL // Explicit URL