summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/ThreadViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/ViewControllers/ThreadViewController.m')
-rw-r--r--Juick/ViewControllers/ThreadViewController.m8
1 files changed, 3 insertions, 5 deletions
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m
index c345822..8ee7623 100644
--- a/Juick/ViewControllers/ThreadViewController.m
+++ b/Juick/ViewControllers/ThreadViewController.m
@@ -9,14 +9,12 @@
#import "ThreadViewController.h"
#import "NewPostViewController.h"
#import "MessageCell.h"
-#import "APIClient.h"
-#import "AppDelegate.h"
@implementation ThreadViewController
-(void) viewDidLoad {
- [self setPath:[APIClient threadUrl]];
+ [self setPath:[API threadUrl]];
[super viewDidLoad];
self.messagesDelegate = self;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(replyPosted:) name:ReplyPostedNotificationName object:nil];
@@ -30,10 +28,10 @@
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender {
if ([identifier isEqualToString:@"editorSegue"]) {
- if ([[APIClient sharedClient] isAuthenticated]) {
+ if ([[NSUserDefaults standardUserDefaults] stringForKey:@"token"]) {
return YES;
} else {
- [[AppDelegate shared] presentLoginView:self];
+ [[AppDelegate shared] unauthorized];
return NO;
}
}