summaryrefslogtreecommitdiff
path: root/Juick
diff options
context:
space:
mode:
Diffstat (limited to 'Juick')
-rw-r--r--Juick/AppDelegate.m2
-rw-r--r--Juick/Supporting Files/Juick-Info.plist2
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m14
3 files changed, 5 insertions, 13 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 04a441c..93c6b5b 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -32,6 +32,8 @@
NSDictionary *userInfo = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];
if (userInfo != nil) {
self.pushedThread = [userInfo objectForKey:@"mid"];
+ UINavigationController *main = (UINavigationController *) self.window.rootViewController;
+ [main performSegueWithIdentifier:@"threadViewSegue" sender:main];
}
return YES;
}
diff --git a/Juick/Supporting Files/Juick-Info.plist b/Juick/Supporting Files/Juick-Info.plist
index a4a2a4f..f25b2bc 100644
--- a/Juick/Supporting Files/Juick-Info.plist
+++ b/Juick/Supporting Files/Juick-Info.plist
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0.25</string>
+ <string>1.0.26</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index 3c473d5..f5d362f 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -18,17 +18,6 @@
@implementation DiscoverViewController
-AppDelegate *appDelegate;
-
--(void) awakeFromNib {
- [super awakeFromNib];
- appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
- if (appDelegate.pushedThread != nil) {
- [self performSegueWithIdentifier:@"threadViewSegue" sender:self];
- }
-}
-
-
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString * cellIdentifier = @"messageCell";
MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
@@ -38,6 +27,7 @@ AppDelegate *appDelegate;
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqual: @"threadViewSegue"]) {
NSNumber *mid;
+ AppDelegate *appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate;
if (appDelegate.pushedThread != nil) {
mid = appDelegate.pushedThread;
} else {
@@ -46,7 +36,7 @@ AppDelegate *appDelegate;
}
ThreadViewController *threadVC = (ThreadViewController *)segue.destinationViewController;
[threadVC setPath:[APIClient threadUrl]];
- [threadVC setParams:[NSMutableDictionary dictionaryWithObjectsAndKeys:mid, @"mid", nil]];
+ [threadVC setParams:[@{@"mid": mid } mutableCopy]];
}
}