diff options
author | Vitaly Takmazov | 2019-03-24 11:36:47 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-03-24 11:36:47 +0300 |
commit | e16eb980016b370f16bb8315434152decc1239b3 (patch) | |
tree | e89495935d03266393dd32ce0da2a4a3a1d46be2 /Juick | |
parent | ada66381c8de790190278a465b9f860461b8c512 (diff) |
Cleanup unused code
Diffstat (limited to 'Juick')
-rw-r--r-- | Juick/Main.storyboard | 4 | ||||
-rw-r--r-- | Juick/ViewControllers/MessagesViewController.h | 1 | ||||
-rw-r--r-- | Juick/ViewControllers/MessagesViewController.m | 24 |
3 files changed, 3 insertions, 26 deletions
diff --git a/Juick/Main.storyboard b/Juick/Main.storyboard index 9bb775d..2438017 100644 --- a/Juick/Main.storyboard +++ b/Juick/Main.storyboard @@ -365,7 +365,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <prototypes> - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="Nlo-27-7g6"> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="prototypeMessage" id="Nlo-27-7g6"> <rect key="frame" x="0.0" y="28" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Nlo-27-7g6" id="1Ma-Fq-9gP"> @@ -415,7 +415,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <prototypes> - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="DWy-O3-T1C"> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="prototypeMessage" id="DWy-O3-T1C"> <rect key="frame" x="0.0" y="28" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DWy-O3-T1C" id="bMl-aO-eZb"> diff --git a/Juick/ViewControllers/MessagesViewController.h b/Juick/ViewControllers/MessagesViewController.h index 8f41af7..c8eb4cf 100644 --- a/Juick/ViewControllers/MessagesViewController.h +++ b/Juick/ViewControllers/MessagesViewController.h @@ -12,7 +12,6 @@ extern NSString* const messageCellIdentifier; @protocol MessagesDelegate --(void) didReceiveChallenge; -(void) loadMore; @end diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m index 88bee93..57087d7 100644 --- a/Juick/ViewControllers/MessagesViewController.m +++ b/Juick/ViewControllers/MessagesViewController.m @@ -33,11 +33,7 @@ NSString* const messageCellIdentifier = @"messageCell"; } [[APIClient sharedClient] pullNextFromPath:self.path params:self.params callback:^(NSArray *next, NSError *err) { if (err) { - if ([err.domain isEqual: @"JuickErrorDomain"] && err.code == 401) { - [self.messagesDelegate didReceiveChallenge]; - } else { - [User throwUnableToLogin:self error:err]; - } + [User throwUnableToLogin:self error:err]; return; } NSArray *newMsgs = next; @@ -141,24 +137,6 @@ NSString* const messageCellIdentifier = @"messageCell"; -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { /* - NSNumber *mid; - Message *msg = [self.messages objectAtIndex:[self.tableView indexPathForSelectedRow].row]; - BOOL scrollToEnd = NO; - if ([AppDelegate shared].pushedThread != nil) { - mid = [[AppDelegate shared].pushedThread copy]; - [AppDelegate shared].pushedThread = nil; - [AppDelegate shared].pushedUname = nil; - scrollToEnd = YES; - } else { - mid = msg.mid; - } - if ([mid integerValue] > 0) { - ThreadViewController *threadVC = (ThreadViewController *)segue.destinationViewController; - [threadVC setMessages:[@[msg] mutableCopy]]; - [threadVC setPath:[APIClient threadUrl]]; - [threadVC setParams:@{@"mid": mid }]; - [threadVC setShouldScrollToBottomOnRefresh:scrollToEnd]; - } if ([segue.identifier isEqual: @"profileSegue"]) { BlogViewController *blogVC = (BlogViewController *)segue.destinationViewController; [blogVC setUname:self.selectedUser]; |