From a4985351876fe023dad9a46d457f428a7cfc6765 Mon Sep 17 00:00:00 2001 From: lint <47455468+lint@users.noreply.github.com> Date: Wed, 9 Oct 2019 11:07:41 -0400 Subject: [PATCH] Fix post crash in Reddit 4.44.0 --- control | 2 +- tweak/Reddit.h | 5 +++++ tweak/Reddit.xm | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/control b/control index 1347942..d764043 100644 --- a/control +++ b/control @@ -1,7 +1,7 @@ Package: com.lint.undelete Name: TFDidThatSay? Depends: mobilesubstrate -Version: 1.2.0 +Version: 1.2.1 Architecture: iphoneos-arm Description: See "[deleted]" comments and posts without leaving Reddit! Maintainer: lint diff --git a/tweak/Reddit.h b/tweak/Reddit.h index d3cdace..57fc363 100644 --- a/tweak/Reddit.h +++ b/tweak/Reddit.h @@ -71,12 +71,17 @@ @interface FeedPostDetailCellNode @property(assign,nonatomic) id textNode; @property(assign,nonatomic) id delegate; +@property(assign,nonatomic) id contentNode; @end @interface FeedPostDetailDelegator @property(assign,nonatomic) id viewController; @end +@interface FeedPostContentNode +-(void) configureSelfTextNode; +@end + /* -- Other Interfaces -- */ diff --git a/tweak/Reddit.xm b/tweak/Reddit.xm index 211eacc..a65081b 100644 --- a/tweak/Reddit.xm +++ b/tweak/Reddit.xm @@ -228,9 +228,12 @@ [post setAuthor:author]; [post setValue:body forKey:@"selfText"]; - - [[[[self postActionSheetDelegate] controller] feedPostDetailCellNode] configureSelfTextNode]; - + if ([[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"] componentsSeparatedByString:@"."][1] integerValue] >= 44){ + [[[[[self postActionSheetDelegate] controller] feedPostDetailCellNode] contentNode] configureSelfTextNode]; + } else { + [[[[self postActionSheetDelegate] controller] feedPostDetailCellNode] configureSelfTextNode]; + } + [request release]; [queue release]; [bodyMutableAttributedText release];