2
0

Remove debugging "Save" button + fix keybaord appearance.

[FIXED]     Keyboard didn't appear when app is reactivated.
[REMOVED]   "Save" option in user menu on lock screen was for debugging.
This commit is contained in:
Maarten Billemont 2012-08-05 11:40:50 +02:00
parent b38e8d9ea6
commit d429044f64

View File

@ -292,9 +292,8 @@
} }
[self updateLayoutAnimated:YES allowScroll:YES completion:^(BOOL finished) { [self updateLayoutAnimated:YES allowScroll:YES completion:^(BOOL finished) {
if (finished) if (self.selectedUser)
if (self.selectedUser) [self.passwordField becomeFirstResponder];
[self.passwordField becomeFirstResponder];
}]; }];
} }
@ -738,27 +737,24 @@
[PearlSheet showSheetWithTitle:targetedUser.name [PearlSheet showSheetWithTitle:targetedUser.name
message:nil viewStyle:UIActionSheetStyleBlackTranslucent message:nil viewStyle:UIActionSheetStyleBlackTranslucent
initSheet:nil initSheet:nil tappedButtonBlock:^(UIActionSheet *sheet, NSInteger buttonIndex) {
tappedButtonBlock:^(UIActionSheet *sheet, NSInteger buttonIndex) { if (buttonIndex == [sheet cancelButtonIndex])
if (buttonIndex == [sheet cancelButtonIndex]) return;
return;
if (buttonIndex == [sheet destructiveButtonIndex]) { if (buttonIndex == [sheet destructiveButtonIndex]) {
[[MPAppDelegate get].managedObjectContextIfReady performBlockAndWait:^{ [[MPAppDelegate get].managedObjectContextIfReady performBlockAndWait:^{
[[MPAppDelegate get].managedObjectContextIfReady deleteObject:targetedUser]; [[MPAppDelegate get].managedObjectContextIfReady deleteObject:targetedUser];
}]; }];
[[MPAppDelegate get] saveContext]; [[MPAppDelegate get] saveContext];
[self updateUsers]; [self updateUsers];
} else return;
if (buttonIndex == [sheet firstOtherButtonIndex]) { }
[[MPAppDelegate get] changeMasterPasswordFor:targetedUser didResetBlock:^{
[[self avatarForUser:targetedUser] setSelected:YES]; if (buttonIndex == [sheet firstOtherButtonIndex])
}]; [[MPAppDelegate get] changeMasterPasswordFor:targetedUser didResetBlock:^{
} [[self avatarForUser:targetedUser] setSelected:YES];
else }];
[[MPAppDelegate get] saveContext]; } cancelTitle:[PearlStrings get].commonButtonCancel
} cancelTitle:[PearlStrings get].commonButtonCancel destructiveTitle:@"Delete User" otherTitles:@"Reset Password", destructiveTitle:@"Delete User" otherTitles:@"Reset Password", nil];
@"Save",
nil];
} }
@end @end