diff options
author | 2014-02-02 00:53:45 +0400 | |
---|---|---|
committer | 2014-02-02 00:53:45 +0400 | |
commit | d52c86da9751f221a24c21ec903656e279ba885a (patch) | |
tree | 1b5b8d45efe472c5e997a4ae1f2293d55291f31d /Juick/AppDelegate.m | |
parent | 552680443dea2ea5e3ce64d03dc4b6d2e39a7226 (diff) |
Login info in reveal panel and login flow improvements (not complete)
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r-- | Juick/AppDelegate.m | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index 779de12..7c90018 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -57,8 +57,18 @@ split.delegate = messages; self.viewController = split; } - [messages loadFromPath:[Message messagesUrl] withParams:nil withTitle:@"Discover"]; - + if ([User isAuthenticated]) { + [User checkIsValid:^(BOOL success) { + if (success) { + [messages loadFromPath:[Message feedUrl] withParams:nil withTitle:@"My feed"]; + } else { + [User throwUnableToLogin]; + } + }]; + + } else { + [messages loadFromPath:[Message messagesUrl] withParams:nil withTitle:@"Discover"]; + } self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; |