Fix double reset counter trigger.
[FIXED] Reset password counter triggered twice.
This commit is contained in:
parent
950ce888e2
commit
26f8e086bb
2
External/Pearl
vendored
2
External/Pearl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 32660d8ebc2701bf8f702c64c1bdc1b9382b1612
|
Subproject commit 5736ed0cb528aeabbad5cec1ae133c9002be2983
|
@ -111,6 +111,7 @@
|
|||||||
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillResignActiveNotification object:nil queue:[NSOperationQueue mainQueue]
|
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillResignActiveNotification object:nil queue:[NSOperationQueue mainQueue]
|
||||||
usingBlock:^(NSNotification *note) {
|
usingBlock:^(NSNotification *note) {
|
||||||
self.activeElement = nil;
|
self.activeElement = nil;
|
||||||
|
[self updateWasAnimated:NO];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
self.alertBody.text = nil;
|
self.alertBody.text = nil;
|
||||||
@ -296,7 +297,7 @@
|
|||||||
[self changeElementWithWarning:
|
[self changeElementWithWarning:
|
||||||
@"You are incrementing the site's password counter.\n\n"
|
@"You are incrementing the site's password counter.\n\n"
|
||||||
@"If you continue, a new password will be generated for this site. "
|
@"If you continue, a new password will be generated for this site. "
|
||||||
@"You will then need to update your account's old password to this newly generated password.\n"
|
@"You will then need to update your account's old password to this newly generated password.\n\n"
|
||||||
@"You can reset the counter by holding down on this button."
|
@"You can reset the counter by holding down on this button."
|
||||||
do:^{
|
do:^{
|
||||||
++((MPElementGeneratedEntity *) self.activeElement).counter;
|
++((MPElementGeneratedEntity *) self.activeElement).counter;
|
||||||
@ -307,6 +308,9 @@
|
|||||||
|
|
||||||
- (IBAction)resetPasswordCounter:(UILongPressGestureRecognizer *)sender {
|
- (IBAction)resetPasswordCounter:(UILongPressGestureRecognizer *)sender {
|
||||||
|
|
||||||
|
if (sender.state != UIGestureRecognizerStateBegan)
|
||||||
|
// Only fire when the gesture was first detected.
|
||||||
|
return;
|
||||||
if (![self.activeElement isKindOfClass:[MPElementGeneratedEntity class]])
|
if (![self.activeElement isKindOfClass:[MPElementGeneratedEntity class]])
|
||||||
// Not of a type that supports a password counter.
|
// Not of a type that supports a password counter.
|
||||||
return;
|
return;
|
||||||
|
@ -599,7 +599,6 @@ L4m3P4sSw0rD</string>
|
|||||||
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.5" id="cZr-Fj-eBw">
|
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.5" id="cZr-Fj-eBw">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="resetPasswordCounter:" destination="PQa-Xl-A3x" id="JL9-Ob-AjQ"/>
|
<action selector="resetPasswordCounter:" destination="PQa-Xl-A3x" id="JL9-Ob-AjQ"/>
|
||||||
<outlet property="delegate" destination="PQa-Xl-A3x" id="PMQ-so-Cj7"/>
|
|
||||||
</connections>
|
</connections>
|
||||||
</pongPressGestureRecognizer>
|
</pongPressGestureRecognizer>
|
||||||
</objects>
|
</objects>
|
||||||
|
Loading…
Reference in New Issue
Block a user