Skip to content

Commit 76e6a79

Browse files
Merge pull request #1717 from Infomaniak/webview-spacing
Fix webview min height and add reply/forward new line
2 parents 450d38d + 2340faa commit 76e6a79

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/ReplyForwardFooterManager.kt

+2
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class ReplyForwardFooterManager @Inject constructor(private val appContext: Cont
133133

134134
val forwardRoot = "<div class=\"${MessageBodyUtils.INFOMANIAK_FORWARD_QUOTE_HTML_CLASS_NAME}\" />"
135135
return parseAndWrapElementInNewDocument(forwardRoot).apply {
136+
addAndEscapeTextLine("")
136137
addAndEscapeTextLine("---------- $messageForwardHeader ---------")
137138
addAndEscapeTextLine("$fromTitle ${message.fromName()}")
138139
addAndEscapeTextLine("$dateTitle ${message.date.toDate().formatForHeader()}")
@@ -149,6 +150,7 @@ class ReplyForwardFooterManager @Inject constructor(private val appContext: Cont
149150
private fun assembleReplyHtmlFooter(messageReplyHeader: String, previousFullBody: String): String {
150151
val replyRoot = """<div class="${MessageBodyUtils.INFOMANIAK_REPLY_QUOTE_HTML_CLASS_NAME}" />"""
151152
return parseAndWrapElementInNewDocument(replyRoot).apply {
153+
addAndEscapeTextLine("")
152154
addAndEscapeTextLine(messageReplyHeader, endWithBr = false)
153155
addReplyBlockQuote {
154156
addAlreadyEscapedBody(previousFullBody)

app/src/main/res/layout/item_message.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,9 @@
425425
android:id="@+id/messageLoader"
426426
android:layout_width="match_parent"
427427
android:layout_height="wrap_content"
428+
android:layout_marginHorizontal="@dimen/threadHorizontalMargin"
428429
android:orientation="vertical"
429430
android:visibility="gone"
430-
android:layout_marginHorizontal="@dimen/threadHorizontalMargin"
431431
app:layout_constraintBottom_toBottomOf="parent"
432432
app:layout_constraintEnd_toEndOf="parent"
433433
app:layout_constraintStart_toStartOf="parent"
@@ -473,7 +473,7 @@
473473
android:id="@+id/webViewsFrameLayout"
474474
android:layout_width="match_parent"
475475
android:layout_height="match_parent"
476-
android:minHeight="100dp"
476+
android:minHeight="70dp"
477477
app:layout_constraintBottom_toTopOf="@id/quoteButtonFrameLayout"
478478
app:layout_constraintEnd_toEndOf="parent"
479479
app:layout_constraintStart_toStartOf="parent"

0 commit comments

Comments
 (0)