Added two solutions for no public key

This commit is contained in:
M66B 2020-06-28 10:37:48 +02:00
parent 857e66be92
commit ad7ce25ef8
2 changed files with 36 additions and 4 deletions

View File

@ -2603,10 +2603,35 @@ public class FragmentCompose extends FragmentBase {
new Intent(getContext(), ActivitySetup.class)
.putExtra("tab", "encryption"));
else {
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();
}
}
});

View File

@ -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"