Skip to content

Commit

Permalink
Removed Unwanted Addition
Browse files Browse the repository at this point in the history
  • Loading branch information
ANGOmarcello authored and Angelo Cammalleri committed Oct 14, 2015
1 parent d3e8bbd commit e141605
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
16 changes: 2 additions & 14 deletions GammaTest/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[self updateShortCutItem];
}

[GammaController autoChangeOrangenessIfNeeded];

return YES;
}

Expand Down Expand Up @@ -137,18 +139,4 @@ - (void)application:(UIApplication *)application performActionForShortcutItem:(U
completionHandler(handledShortCutItem);
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
NSLog(@"applicationDidEnterBackground");

// Timeout is set to 10 minutes this is the minimum
[[UIApplication sharedApplication] setKeepAliveTimeout:600 handler:^{
NSLog(@"App woke with keep alive timeout");
[GammaController autoChangeOrangenessIfNeeded];

// TODO Might be possible to implement long transisions with this
// Also it could be better to remove fetch requests or deactivate them as long as this works
}];
}

@end
4 changes: 4 additions & 0 deletions GammaTest/GammaController.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ + (void)wakeUpScreenIfNeeded {
+ (void)autoChangeOrangenessIfNeeded {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

if ([defaults boolForKey:@"enabled"]){
[self enableOrangeness];
}

if (![defaults boolForKey:@"colorChangingEnabled"]) {
return;
}
Expand Down
1 change: 0 additions & 1 deletion GammaTest/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<true/>
<key>UIBackgroundModes</key>
<array>
<string>voip</string>
<string>fetch</string>
<string>remote-notification</string>
</array>
Expand Down
1 change: 1 addition & 0 deletions GammaTest/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ - (void)viewDidLoad {

timePicker = [[UIDatePicker alloc] init];
timePicker.datePickerMode = UIDatePickerModeTime;
timePicker.minuteInterval = 15;
timePicker.backgroundColor = [UIColor whiteColor];
[timePicker addTarget:self action:@selector(timePickerValueChanged:) forControlEvents:UIControlEventValueChanged];

Expand Down

0 comments on commit e141605

Please sign in to comment.