mirror of https://github.com/M66B/FairEmail.git
Added empty message warning
This commit is contained in:
parent
1356c2d27f
commit
2c74e0208f
|
@ -2860,6 +2860,9 @@ public class FragmentCompose extends FragmentBase {
|
|||
if (TextUtils.isEmpty(draft.subject))
|
||||
args.putBoolean("remind_subject", true);
|
||||
|
||||
if (empty)
|
||||
args.putBoolean("remind_text", true);
|
||||
|
||||
int attached = 0;
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (!attachment.available)
|
||||
|
@ -2990,9 +2993,10 @@ public class FragmentCompose extends FragmentBase {
|
|||
} else if (action == R.id.action_check) {
|
||||
boolean dialog = args.getBundle("extras").getBoolean("dialog");
|
||||
boolean remind_subject = args.getBoolean("remind_subject", false);
|
||||
boolean remind_text = args.getBoolean("remind_text", false);
|
||||
boolean remind_attachment = args.getBoolean("remind_attachment", false);
|
||||
|
||||
if (dialog || remind_subject || remind_attachment) {
|
||||
if (dialog || remind_subject || remind_text || remind_attachment) {
|
||||
setBusy(false);
|
||||
|
||||
FragmentDialogSend fragment = new FragmentDialogSend();
|
||||
|
@ -3463,6 +3467,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
Bundle args = getArguments();
|
||||
boolean dialog = args.getBundle("extras").getBoolean("dialog");
|
||||
boolean remind_subject = args.getBoolean("remind_subject", false);
|
||||
boolean remind_text = args.getBoolean("remind_text", false);
|
||||
boolean remind_attachment = args.getBoolean("remind_attachment", false);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
@ -3474,6 +3479,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
final ViewGroup dview = (ViewGroup) LayoutInflater.from(getContext()).inflate(R.layout.dialog_send, null);
|
||||
final TextView tvRemindSubject = dview.findViewById(R.id.tvRemindSubject);
|
||||
final TextView tvRemindText = dview.findViewById(R.id.tvRemindText);
|
||||
final TextView tvRemindAttachment = dview.findViewById(R.id.tvRemindAttachment);
|
||||
final TextView tvTo = dview.findViewById(R.id.tvTo);
|
||||
final TextView tvVia = dview.findViewById(R.id.tvVia);
|
||||
|
@ -3488,6 +3494,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
final TextView tvNotAgain = dview.findViewById(R.id.tvNotAgain);
|
||||
|
||||
tvRemindSubject.setVisibility(remind_subject ? View.VISIBLE : View.GONE);
|
||||
tvRemindText.setVisibility(remind_text ? View.VISIBLE : View.GONE);
|
||||
tvRemindAttachment.setVisibility(remind_attachment ? View.VISIBLE : View.GONE);
|
||||
tvTo.setText(null);
|
||||
tvVia.setText(null);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
android:id="@+id/tvRemindSubject"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/title_subject_reminder"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?attr/colorWarning"
|
||||
|
@ -31,16 +31,27 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/tvMessage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRemindAttachment"
|
||||
android:id="@+id/tvRemindText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/title_attachment_reminder"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/title_text_reminder"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?attr/colorWarning"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvRemindSubject" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRemindAttachment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/title_attachment_reminder"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?attr/colorWarning"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvRemindText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvToTitle"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -615,6 +615,7 @@
|
|||
<string name="title_from_missing">Sender missing</string>
|
||||
<string name="title_to_missing">Recipient missing</string>
|
||||
<string name="title_subject_reminder">Subject is empty</string>
|
||||
<string name="title_text_reminder">Message is empty</string>
|
||||
<string name="title_attachment_keywords">attached,attachment,attachments,included</string>
|
||||
<string name="title_attachment_reminder">Did you intend to add an attachment?</string>
|
||||
<string name="title_attachments_missing">Not all attachments are downloaded</string>
|
||||
|
|
Loading…
Reference in New Issue