Allow cancelation of password dialog in settings screen for seed display

This commit is contained in:
pokkst 2022-09-19 12:48:53 -05:00
parent 7ca22077d6
commit 59a5dc0794
No known key found for this signature in database
GPG Key ID: 90C2ED85E67A50FF
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import java.io.File;
public class PasswordBottomSheetDialog extends BottomSheetDialogFragment {
public PasswordListener listener = null;
public boolean cancelable = false;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@ -30,7 +31,7 @@ public class PasswordBottomSheetDialog extends BottomSheetDialogFragment {
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
setCancelable(false);
setCancelable(cancelable);
File walletFile = new File(getActivity().getApplicationInfo().dataDir, Constants.WALLET_NAME);
ImageButton pastePasswordImageButton = view.findViewById(R.id.paste_password_imagebutton);

View File

@ -130,6 +130,7 @@ public class SettingsFragment extends Fragment implements PasswordBottomSheetDia
boolean usesPassword = PrefService.getInstance().getBoolean(Constants.PREF_USES_PASSWORD, false);
if (usesPassword) {
PasswordBottomSheetDialog passwordDialog = new PasswordBottomSheetDialog();
passwordDialog.cancelable = true;
passwordDialog.listener = this;
passwordDialog.show(getActivity().getSupportFragmentManager(), "password_dialog");
} else {