mirror of https://github.com/M66B/FairEmail.git
Added two solutions for no public key
This commit is contained in:
parent
857e66be92
commit
ad7ce25ef8
|
@ -2603,10 +2603,35 @@ public class FragmentCompose extends FragmentBase {
|
|||
new Intent(getContext(), ActivitySetup.class)
|
||||
.putExtra("tab", "encryption"));
|
||||
else {
|
||||
FragmentDialogSend fragment = new FragmentDialogSend();
|
||||
fragment.setArguments(args);
|
||||
fragment.setTargetFragment(FragmentCompose.this, REQUEST_SEND);
|
||||
fragment.show(getParentFragmentManager(), "compose:send");
|
||||
View vwAnchor = view.findViewById(R.id.vwAnchor);
|
||||
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), vwAnchor);
|
||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_send_dialog, 1, R.string.title_send_dialog);
|
||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_advanced_manage_certificates, 2, R.string.title_advanced_manage_certificates);
|
||||
|
||||
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.string.title_send_dialog:
|
||||
FragmentDialogSend fragment = new FragmentDialogSend();
|
||||
fragment.setArguments(args);
|
||||
fragment.setTargetFragment(FragmentCompose.this, REQUEST_SEND);
|
||||
fragment.show(getParentFragmentManager(), "compose:send");
|
||||
return true;
|
||||
|
||||
case R.string.title_advanced_manage_certificates:
|
||||
startActivity(
|
||||
new Intent(getContext(), ActivitySetup.class)
|
||||
.putExtra("tab", "encryption"));
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
popupMenu.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -459,6 +459,13 @@
|
|||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ScrollViewEx>
|
||||
|
||||
<View
|
||||
android:id="@+id/vwAnchor"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/style_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/style_bar"
|
||||
android:layout_width="0dp"
|
||||
|
|
Loading…
Reference in New Issue