Skip to content

Commit

Permalink
added secon auto complete route
Browse files Browse the repository at this point in the history
  • Loading branch information
josephlausf committed Dec 15, 2015
1 parent 8a8870e commit 12a801c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Bento Dev-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>3</string>
<string>4</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
moduleName = "Bento Dev"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/JosephLauSF/_github/Bento/Bento/ViewController/SignIn/SignInViewController.m"
timestampString = "471836456.855421"
timestampString = "471909971.711956"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "463"
Expand All @@ -253,7 +253,7 @@
moduleName = "Bento Dev"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/JosephLauSF/_github/Bento/Bento/ViewController/SignIn/SignInViewController.m"
timestampString = "471836456.855553"
timestampString = "471909971.712099"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "463"
Expand Down Expand Up @@ -558,31 +558,15 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bento/ViewController/MakeBento/CustomBentoViewController.m"
timestampString = "471840422.426864"
timestampString = "471909971.312211"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1563"
endingLineNumber = "1563"
startingLineNumber = "1577"
endingLineNumber = "1577"
landmarkName = "-collectionView:willDisplayCell:forItemAtIndexPath:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bento/ViewController/MakeBento/CustomBentoViewController.m"
timestampString = "471840422.426864"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1252"
endingLineNumber = "1252"
landmarkName = "-onFinalize"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
Expand Down
2 changes: 1 addition & 1 deletion Bento/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2</string>
<string>3</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down
30 changes: 22 additions & 8 deletions Bento/ViewController/MakeBento/CustomBentoViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ - (void)onAddAnotherBento
- (void)addonsViewControllerDidTapOnFinalize:(BOOL)didTapOnFinalize
{
if (didTapOnFinalize == YES) {
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(gotoOrderScreen) userInfo:nil repeats:NO];
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(onFinalize) userInfo:nil repeats:NO];
}
}

Expand All @@ -1241,18 +1241,32 @@ - (void)onViewAddons {

- (void)onFinalize
{
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AutoShowAddons"] == YES) {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"didAutoShowAddons"] != YES) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"didAutoShowAddons"];
[self.navigationController presentViewController:addonsVC animated:YES completion:nil];
if ([self isInMiddleOfBuildingBento]) {
[self showConfirmMsg];
}
else {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AutoShowAddons"] == YES) {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"didAutoShowAddons"] != YES) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"didAutoShowAddons"];
[self.navigationController presentViewController:addonsVC animated:YES completion:nil];
}
else {
[self gotoOrderScreen];
}
}
else {
[self gotoOrderScreen];
}
}
else {
[self gotoOrderScreen];
}

- (BOOL)isInMiddleOfBuildingBento {
Bento *currentBento = [[BentoShop sharedInstance] getCurrentBento];
if (currentBento != nil && ![currentBento isEmpty] && ![currentBento isCompleted]) {
return YES;
}

return NO;
}

- (void)updateUI
Expand Down Expand Up @@ -1421,7 +1435,7 @@ - (void)alertView:(MyAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
[currentBento completeBento:@"todayDinner"];
}

[self gotoOrderScreen];
[self onFinalize];
}
}

Expand Down

0 comments on commit 12a801c

Please sign in to comment.