From d958ef04d427b284ccaa161a5634cd602802d415 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Thu, 7 Dec 2017 21:24:47 +0300
Subject: fix thread push
---
Juick/AppDelegate.m | 2 --
Juick/Supporting Files/Juick-Info.plist | 2 +-
Juick/ViewControllers/DiscoverViewController.m | 9 ++++++++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 93c6b5b..04a441c 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -32,8 +32,6 @@
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 9a0b1eb..7aabcda 100644
--- a/Juick/Supporting Files/Juick-Info.plist
+++ b/Juick/Supporting Files/Juick-Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature
????
CFBundleVersion
- 1.0.27
+ 1.0.28
ITSAppUsesNonExemptEncryption
LSApplicationCategoryType
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index f5d362f..3822643 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -18,6 +18,14 @@
@implementation DiscoverViewController
+AppDelegate *appDelegate;
+
+-(void) viewDidLoad {
+ [super viewDidLoad];
+ appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate;
+ [self performSegueWithIdentifier:@"threadViewSegue" sender:self];
+}
+
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString * cellIdentifier = @"messageCell";
MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
@@ -27,7 +35,6 @@
-(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 {
--
cgit v1.2.3