Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

Is there any event that fires when we close the lock? #144

Open
yalamber opened this issue Apr 13, 2017 · 2 comments
Open

Is there any event that fires when we close the lock? #144

yalamber opened this issue Apr 13, 2017 · 2 comments

Comments

@yalamber
Copy link

Hello,
Is it possible to make event fire when lock is closed or hides?

@Zip753
Copy link

Zip753 commented Apr 13, 2017

According to this chunk of code

void(^dismissBlock)() = ^{
    self.shown =  NO;
    callback(@[@"Lock was dismissed by the user", [NSNull null], [NSNull null]]);
};

you should receive a callback with first (error) argument set to "Lock was dismissed by the user", so you can use it like this:

lock.show(params, (err, profile, token) => {
  if (err) {
    if (err === "Lock was dismissed by the user") {
      // Do dismiss logic here
    }
    // Process other errors
    return;
  }
  // Do normal auth flow
});

I haven't actually tested this code, but I think it should do the trick :)

@yalamber
Copy link
Author

yalamber commented Jun 8, 2017

Thanks will try this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants