Skip to content

Commit

Permalink
Fix missing space between signature and body when sending an email
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Jul 11, 2024
1 parent ec8593f commit bf63a91
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ class NewMessageFragment : Fragment() {
if (context.isNightModeEnabled()) editor.addCss(context.readRawResource(R.raw.custom_dark_mode))

addCss(context.readRawResource(R.raw.style))
addCss(context.readRawResource(R.raw.editor_style))

isEmptyFlow
.filterNotNull()
Expand Down
29 changes: 18 additions & 11 deletions app/src/main/res/layout/fragment_new_message.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
android:id="@+id/editorLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/marginStandardMedium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/attachmentsRecyclerView">
Expand All @@ -297,19 +298,25 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/newMessagePlaceholder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/marginStandardMedium"
android:text="@string/newMessagePlaceholderTitle"
android:textColor="@color/tertiaryTextColor"
android:visibility="gone"
tools:visibility="visible" />

</FrameLayout>

<TextView
android:id="@+id/newMessagePlaceholder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/marginStandardMedium"
android:layout_marginTop="@dimen/marginStandardMedium"
android:text="@string/newMessagePlaceholderTitle"
android:textColor="@color/tertiaryTextColor"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/editorLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/editorLayout"
tools:visibility="visible" />

<LinearLayout
android:id="@+id/bodyLoader"
android:layout_width="match_parent"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/raw/editor_style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
margin-top: 0px;
margin-bottom: 0px;
}
2 changes: 1 addition & 1 deletion app/src/main/res/raw/signature_margins.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
body { margin-top: 0px; margin-bottom: 1rem; } /* Only one selector in the whole file is supported. Here it's `body` */
body { margin-top: 1rem; margin-bottom: 1rem; } /* Only one selector in the whole file is supported. Here it's `body` */

0 comments on commit bf63a91

Please sign in to comment.