Skip to content

Commit d38278b

Browse files
committed
Fix missing space between signature and body when sending an email
1 parent 87ec7a9 commit d38278b

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

app/src/main/java/com/infomaniak/mail/ui/newMessage/NewMessageFragment.kt

+1
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ class NewMessageFragment : Fragment() {
312312
if (context.isNightModeEnabled()) editor.addCss(context.readRawResource(R.raw.custom_dark_mode))
313313

314314
addCss(context.readRawResource(R.raw.style))
315+
addCss(context.readRawResource(R.raw.editor_style))
315316

316317
isEmptyFlow
317318
.filterNotNull()

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

+18-11
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@
288288
android:id="@+id/editorLayout"
289289
android:layout_width="match_parent"
290290
android:layout_height="wrap_content"
291+
android:paddingTop="@dimen/marginStandardMedium"
291292
app:layout_constraintEnd_toEndOf="parent"
292293
app:layout_constraintStart_toStartOf="parent"
293294
app:layout_constraintTop_toBottomOf="@id/attachmentsRecyclerView">
@@ -297,19 +298,25 @@
297298
android:layout_width="match_parent"
298299
android:layout_height="wrap_content" />
299300

300-
<TextView
301-
android:id="@+id/newMessagePlaceholder"
302-
android:layout_width="wrap_content"
303-
android:layout_height="wrap_content"
304-
android:layout_gravity="center_vertical"
305-
android:layout_marginStart="@dimen/marginStandardMedium"
306-
android:text="@string/newMessagePlaceholderTitle"
307-
android:textColor="@color/tertiaryTextColor"
308-
android:visibility="gone"
309-
tools:visibility="visible" />
310-
311301
</FrameLayout>
312302

303+
<TextView
304+
android:id="@+id/newMessagePlaceholder"
305+
android:layout_width="wrap_content"
306+
android:layout_height="wrap_content"
307+
android:layout_gravity="center_vertical"
308+
android:layout_marginStart="@dimen/marginStandardMedium"
309+
android:layout_marginTop="@dimen/marginStandardMedium"
310+
android:text="@string/newMessagePlaceholderTitle"
311+
android:textColor="@color/tertiaryTextColor"
312+
android:visibility="gone"
313+
app:layout_constraintBottom_toBottomOf="@id/editorLayout"
314+
app:layout_constraintEnd_toEndOf="parent"
315+
app:layout_constraintHorizontal_bias="0"
316+
app:layout_constraintStart_toStartOf="parent"
317+
app:layout_constraintTop_toTopOf="@id/editorLayout"
318+
tools:visibility="visible" />
319+
313320
<LinearLayout
314321
android:id="@+id/bodyLoader"
315322
android:layout_width="match_parent"

app/src/main/res/raw/editor_style.css

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
body {
2+
margin-top: 0px;
3+
margin-bottom: 0px;
4+
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
body { margin-top: 0px; margin-bottom: 1rem; } /* Only one selector in the whole file is supported. Here it's `body` */
1+
body { margin-top: 1rem; margin-bottom: 1rem; } /* Only one selector in the whole file is supported. Here it's `body` */

0 commit comments

Comments
 (0)