Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setOnFileSelected is not executed #150

Open
tiromansev opened this issue Oct 24, 2024 · 0 comments
Open

setOnFileSelected is not executed #150

tiromansev opened this issue Oct 24, 2024 · 0 comments

Comments

@tiromansev
Copy link

Library version: 1.5.6 and 2.0.0
OS version: Android 10,14 and other
Device model: Pixel 4, Samsung Galaxy A22

After updating to 1.5.6+ versions, SimpleStorageHelper.setOnFileSelected method doesn't executed, other methods like setOnFileCreated and setOnFolderSelected work

this is the code example:

public SafDialog(AppCompatActivity context, SimpleStorageHelper storageHelper) {
        this.context = new WeakReference<>(context);
        this.storageHelper = storageHelper;

        this.storageHelper.setOnFileCreated((requestCode, file) -> {
            if (fileDialogListener == null && fileNameDialogListener == null) {
                return null;
            }
            handleSafAction(file.getUri());
            return null;
        });

        this.storageHelper.setOnFileSelected((requestCode, files) -> {
            if (fileDialogListener == null && fileNameDialogListener == null) {
                return null;
            }
            handleSafAction(files.get(0).getUri());
            return null;
        });

        this.storageHelper.setOnFolderSelected((requestCode, folder) -> {
            if (fileDialogListener == null && fileNameDialogListener == null) {
                return null;
            }
            handleSafAction(folder.getUri());
            return null;
        });
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant