Skip to content

Commit

Permalink
Fixed Welcome screen showing up after every respring
Browse files Browse the repository at this point in the history
  • Loading branch information
lgariv committed Mar 14, 2021
1 parent 9271689 commit a3a4ec6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions welcome.x
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,17 @@
dispatch_once(&progOnceToken, ^{
NSString *valueForMyKey;
@try {
valueForMyKey = [[NSUserDefaults standardUserDefaults] stringForKey:@"progFirstTime"];
valueForMyKey = [[NSUserDefaults standardUserDefaults] objectForKey:@"progFirstTime"];
NSLog(@"[Prog] valueForMyKey:%@", valueForMyKey);
// if ([valueForMyKey isEqualToString:@"NO"]) {
[[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"progFirstTime"];
// }
// [[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"progFirstTime"];
}
@catch ( NSException *exception ) {
if (exception) {
NSLog(@"[Prog] ERROR:%@", exception);
}
valueForMyKey = @"YES";
}
if ([valueForMyKey isEqualToString:@"YES"]) {
if ([valueForMyKey isEqualToString:@"YES"] || [[NSUserDefaults standardUserDefaults] objectForKey:@"progFirstTime"] == nil) {
[[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"progFirstTime"];
UIViewController *donateController = [[UIViewController alloc] init];
[[donateController view] setBackgroundColor:[UIColor systemBackgroundColor]];
Expand Down

0 comments on commit a3a4ec6

Please sign in to comment.