mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Prevent crash
This commit is contained in:
@@ -168,16 +168,14 @@ public class FragmentContacts extends FragmentBase {
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
final Context context = getContext();
|
||||
|
||||
final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_ask_again, null);
|
||||
final View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_ask_again, null);
|
||||
final TextView tvMessage = dview.findViewById(R.id.tvMessage);
|
||||
CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
|
||||
|
||||
tvMessage.setText(getText(R.string.title_delete_contacts));
|
||||
cbNotAgain.setVisibility(View.GONE);
|
||||
|
||||
return new AlertDialog.Builder(context)
|
||||
return new AlertDialog.Builder(getContext())
|
||||
.setView(dview)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
@@ -195,7 +193,7 @@ public class FragmentContacts extends FragmentBase {
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(context, getActivity(), new Bundle(), "contacts:delete");
|
||||
}.execute(getContext(), getActivity(), new Bundle(), "contacts:delete");
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
||||
Reference in New Issue
Block a user