mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Added hint about unused inline images
This commit is contained in:
parent
4ba42bab3f
commit
09f489d139
3 changed files with 21 additions and 1 deletions
|
@ -163,6 +163,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
private ImageButton ibCcBcc;
|
private ImageButton ibCcBcc;
|
||||||
private RecyclerView rvAttachment;
|
private RecyclerView rvAttachment;
|
||||||
private TextView tvNoInternetAttachments;
|
private TextView tvNoInternetAttachments;
|
||||||
|
private TextView tvUnusedInlineImages;
|
||||||
private EditTextCompose etBody;
|
private EditTextCompose etBody;
|
||||||
private TextView tvNoInternet;
|
private TextView tvNoInternet;
|
||||||
private TextView tvSignature;
|
private TextView tvSignature;
|
||||||
|
@ -259,6 +260,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
ibCcBcc = view.findViewById(R.id.ivCcBcc);
|
ibCcBcc = view.findViewById(R.id.ivCcBcc);
|
||||||
rvAttachment = view.findViewById(R.id.rvAttachment);
|
rvAttachment = view.findViewById(R.id.rvAttachment);
|
||||||
tvNoInternetAttachments = view.findViewById(R.id.tvNoInternetAttachments);
|
tvNoInternetAttachments = view.findViewById(R.id.tvNoInternetAttachments);
|
||||||
|
tvUnusedInlineImages = view.findViewById(R.id.tvUnusedInlineImages);
|
||||||
etBody = view.findViewById(R.id.etBody);
|
etBody = view.findViewById(R.id.etBody);
|
||||||
tvNoInternet = view.findViewById(R.id.tvNoInternet);
|
tvNoInternet = view.findViewById(R.id.tvNoInternet);
|
||||||
tvSignature = view.findViewById(R.id.tvSignature);
|
tvSignature = view.findViewById(R.id.tvSignature);
|
||||||
|
@ -649,6 +651,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
rvAttachment.setAdapter(adapter);
|
rvAttachment.setAdapter(adapter);
|
||||||
|
|
||||||
tvNoInternetAttachments.setVisibility(View.GONE);
|
tvNoInternetAttachments.setVisibility(View.GONE);
|
||||||
|
tvUnusedInlineImages.setVisibility(View.GONE);
|
||||||
|
|
||||||
pgpService = new OpenPgpServiceConnection(getContext(), "org.sufficientlysecure.keychain");
|
pgpService = new OpenPgpServiceConnection(getContext(), "org.sufficientlysecure.keychain");
|
||||||
pgpService.bindToService();
|
pgpService.bindToService();
|
||||||
|
@ -2568,11 +2571,14 @@ public class FragmentCompose extends FragmentBase {
|
||||||
|
|
||||||
int available = 0;
|
int available = 0;
|
||||||
boolean downloading = false;
|
boolean downloading = false;
|
||||||
|
boolean inline_images = false;
|
||||||
for (EntityAttachment attachment : attachments) {
|
for (EntityAttachment attachment : attachments) {
|
||||||
if (attachment.available)
|
if (attachment.available)
|
||||||
available++;
|
available++;
|
||||||
if (attachment.progress != null)
|
if (attachment.progress != null)
|
||||||
downloading = true;
|
downloading = true;
|
||||||
|
if (attachment.isInline() && attachment.isImage())
|
||||||
|
inline_images = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.i("Attachments=" + attachments.size() +
|
Log.i("Attachments=" + attachments.size() +
|
||||||
|
@ -2586,6 +2592,8 @@ public class FragmentCompose extends FragmentBase {
|
||||||
|
|
||||||
rvAttachment.setTag(downloading);
|
rvAttachment.setTag(downloading);
|
||||||
checkInternet();
|
checkInternet();
|
||||||
|
|
||||||
|
tvUnusedInlineImages.setVisibility(inline_images ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -224,6 +224,17 @@
|
||||||
app:layout_constraintStart_toStartOf="@id/rvAttachment"
|
app:layout_constraintStart_toStartOf="@id/rvAttachment"
|
||||||
app:layout_constraintTop_toBottomOf="@id/rvAttachment" />
|
app:layout_constraintTop_toBottomOf="@id/rvAttachment" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvUnusedInlineImages"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/title_unused_inline"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/rvAttachment"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/rvAttachment"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvNoInternetAttachments" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/vSeparator"
|
android:id="@+id/vSeparator"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -232,7 +243,7 @@
|
||||||
android:background="?attr/colorSeparator"
|
android:background="?attr/colorSeparator"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvNoInternetAttachments" />
|
app:layout_constraintTop_toBottomOf="@+id/tvUnusedInlineImages" />
|
||||||
|
|
||||||
<eu.faircode.email.EditTextCompose
|
<eu.faircode.email.EditTextCompose
|
||||||
android:id="@+id/etBody"
|
android:id="@+id/etBody"
|
||||||
|
|
|
@ -582,6 +582,7 @@
|
||||||
<string name="title_no_folder">Folder does not exist</string>
|
<string name="title_no_folder">Folder does not exist</string>
|
||||||
<string name="title_no_format">The originally received message will be included</string>
|
<string name="title_no_format">The originally received message will be included</string>
|
||||||
<string name="title_no_image">Image could not be decoded</string>
|
<string name="title_no_image">Image could not be decoded</string>
|
||||||
|
<string name="title_unused_inline">Unused inline images will be removed on save/send</string>
|
||||||
<string name="title_accross_remark">Messages moved across accounts will be downloaded again resulting in extra data usage</string>
|
<string name="title_accross_remark">Messages moved across accounts will be downloaded again resulting in extra data usage</string>
|
||||||
<string name="title_raw_saved">Raw message saved</string>
|
<string name="title_raw_saved">Raw message saved</string>
|
||||||
<string name="title_attachment_saved">Attachment saved</string>
|
<string name="title_attachment_saved">Attachment saved</string>
|
||||||
|
|
Loading…
Reference in a new issue