Added edit signature to send settings

This commit is contained in:
M66B 2021-02-07 10:30:26 +01:00
parent 6a4a32bf61
commit 8b422a24db
2 changed files with 21 additions and 1 deletions

View File

@ -62,6 +62,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
private Spinner spSignatureLocation;
private SwitchCompat swSignatureReply;
private SwitchCompat swSignatureForward;
private Button btnEditSignature;
private SwitchCompat swDiscardDelete;
private SwitchCompat swPlainOnly;
@ -112,6 +113,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
spSignatureLocation = view.findViewById(R.id.spSignatureLocation);
swSignatureReply = view.findViewById(R.id.swSignatureReply);
swSignatureForward = view.findViewById(R.id.swSignatureForward);
btnEditSignature = view.findViewById(R.id.btnEditSignature);
swDiscardDelete = view.findViewById(R.id.swDiscardDelete);
swPlainOnly = view.findViewById(R.id.swPlainOnly);
@ -293,6 +295,14 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
}
});
btnEditSignature.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(v.getContext());
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_VIEW_IDENTITIES));
}
});
swDiscardDelete.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

View File

@ -342,6 +342,16 @@
app:layout_constraintTop_toBottomOf="@id/swSignatureReply"
app:switchPadding="12dp" />
<Button
android:id="@+id/btnEditSignature"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_edit_signature"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swSignatureForward" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swDiscardDelete"
android:layout_width="0dp"
@ -350,7 +360,7 @@
android:text="@string/title_advanced_discard_delete"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swSignatureForward"
app:layout_constraintTop_toBottomOf="@id/btnEditSignature"
app:switchPadding="12dp" />
<eu.faircode.email.FixedTextView