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

Conflict with RadListView (Vue)? #76

Open
jdavidbakr opened this issue Feb 1, 2020 · 1 comment
Open

Conflict with RadListView (Vue)? #76

jdavidbakr opened this issue Feb 1, 2020 · 1 comment

Comments

@jdavidbakr
Copy link

jdavidbakr commented Feb 1, 2020

I have a page that is protected by the fingerprint auth controller, and has a RadListView with sliders. When I install the fingerprint auth on the page, the RadListView slider functionality disappears. I'm using a helper class, which looks like this:

import { FingerprintAuth } from "nativescript-fingerprint-auth";

export default class TouchIdChecker {

    validate() {
        return new Promise((resolve, reject) => {
            var fingerprintAuth = new FingerprintAuth()
            fingerprintAuth
                .verifyFingerprint({
                    title: "Please authenticate to continue",
                    message: "Enter your device password or scan your finger.",
                    authenticationValidityDuration: 10
                })
                .then(() => {
                    resolve();
                })
                .catch(err => {
                    console.log(JSON.stringify(err))
                    reject()
                })
        });
    }

}

and my Vue page has this in the mounted() section:

        mounted() {
            SelectedPageService.getInstance().updateSelectedPage("Events");
            var touchid = new TouchIdChecker;
            touchid.validate()
                .then(function() {
                    this.authenticated = true;
                    this.loadData();
                }.bind(this)) 
                .catch(function() {
                    this.$navigateBack();
                }.bind(this))
        },

If I change my FingerprintAuth to just call resolve(), like this, then the sliders work on the RadListView:

    validate() {
        return new Promise((resolve, reject) => {
            resolve();
        });
    }

so, something is conflicting with RadListView when I use the plugin. Any ideas? I'm working on Android, not sure if the issue would continue in iOS.

@jdavidbakr
Copy link
Author

As a follow-up, I did get it to work but my solution is not optimal. An additional factor is that the 'authenticated' value drives whether or not the parent object containing the RadListView is visible. By making this.authenticated = true at the start, the RadListView works, apparently because it is painted before switching to the fingerprint auth.

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