mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-09 15:50:00 +00:00
Allow cancelation of password dialog in settings screen for seed display
This commit is contained in:
parent
7ca22077d6
commit
59a5dc0794
2 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue