mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 10:55:09 +01:00
Paste image with dialog
This commit is contained in:
@@ -654,16 +654,8 @@ public class FragmentCompose extends FragmentBase {
|
||||
@Override
|
||||
public void onInputContent(Uri uri, String type) {
|
||||
Log.i("Received input uri=" + uri);
|
||||
boolean resize_paste = prefs.getBoolean("resize_paste", true);
|
||||
int resize = prefs.getInt("resize", FragmentCompose.REDUCED_IMAGE_SIZE);
|
||||
boolean resize_width_only = prefs.getBoolean("resize_width_only", false);
|
||||
onAddAttachment(
|
||||
Arrays.asList(new UriType(uri, type, null)),
|
||||
true,
|
||||
resize_paste ? resize : 0,
|
||||
resize_width_only,
|
||||
false,
|
||||
false);
|
||||
UriType uriType = new UriType(uri, type, null);
|
||||
onSharedAttachments(new ArrayList<>(Arrays.asList(uriType)));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -114,7 +114,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||
private SwitchCompat swQuoteReply;
|
||||
private SwitchCompat swQuoteLimit;
|
||||
private SwitchCompat swResizeReply;
|
||||
private SwitchCompat swResizePaste;
|
||||
private Spinner spSignatureLocation;
|
||||
private SwitchCompat swSignatureNew;
|
||||
private SwitchCompat swSignatureReply;
|
||||
@@ -152,7 +151,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||
"compose_color", "compose_font", "compose_text_size", "compose_monospaced",
|
||||
"prefix_once", "prefix_count", "alt_re", "alt_fwd",
|
||||
"separate_reply", "extended_reply", "template_reply", "write_below", "quote_reply", "quote_limit",
|
||||
"resize_reply", "resize_paste",
|
||||
"resize_reply",
|
||||
"signature_location", "signature_new", "signature_reply", "signature_reply_once", "signature_forward",
|
||||
"send_at_top", "attach_new", "auto_link", "plain_only", "plain_only_reply",
|
||||
"format_flowed", "usenet_signature", "remove_signatures",
|
||||
@@ -215,7 +214,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||
swQuoteReply = view.findViewById(R.id.swQuoteReply);
|
||||
swQuoteLimit = view.findViewById(R.id.swQuoteLimit);
|
||||
swResizeReply = view.findViewById(R.id.swResizeReply);
|
||||
swResizePaste = view.findViewById(R.id.swResizePaste);
|
||||
spSignatureLocation = view.findViewById(R.id.spSignatureLocation);
|
||||
swSignatureNew = view.findViewById(R.id.swSignatureNew);
|
||||
swSignatureReply = view.findViewById(R.id.swSignatureReply);
|
||||
@@ -724,13 +722,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||
}
|
||||
});
|
||||
|
||||
swResizePaste.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("resize_paste", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
spSignatureLocation.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
|
||||
@@ -1082,7 +1073,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||
swQuoteReply.setChecked(prefs.getBoolean("quote_reply", true));
|
||||
swQuoteLimit.setChecked(prefs.getBoolean("quote_limit", true));
|
||||
swResizeReply.setChecked(prefs.getBoolean("resize_reply", true));
|
||||
swResizePaste.setChecked(prefs.getBoolean("resize_paste", true));
|
||||
|
||||
int signature_location = prefs.getInt("signature_location", 1);
|
||||
spSignatureLocation.setSelection(signature_location);
|
||||
|
||||
@@ -841,18 +841,6 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/swQuoteLimit"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swResizePaste"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:checked="true"
|
||||
android:text="@string/title_advanced_resize_paste"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swResizeReply"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSignatureLocation"
|
||||
android:layout_width="0dp"
|
||||
@@ -864,7 +852,7 @@
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swResizePaste" />
|
||||
app:layout_constraintTop_toBottomOf="@id/swResizeReply" />
|
||||
|
||||
<eu.faircode.email.SpinnerEx
|
||||
android:id="@+id/spSignatureLocation"
|
||||
|
||||
@@ -519,7 +519,6 @@
|
||||
<string name="title_advanced_quote_reply">Quote replied text</string>
|
||||
<string name="title_advanced_limit_reply">Limit the number of nested quotes</string>
|
||||
<string name="title_advanced_resize_reply">Resize images in replied text</string>
|
||||
<string name="title_advanced_resize_paste">Resize pasted images</string>
|
||||
<string name="title_advanced_signature_location">Signature position</string>
|
||||
<string name="title_advanced_signature_new">Use signature for new messages</string>
|
||||
<string name="title_advanced_signature_reply">Use signature when replying</string>
|
||||
|
||||
Reference in New Issue
Block a user