|
|
|
|
|
|
|
|
id isNightMode;
|
|
|
id isNightMode;
|
|
|
UIColor *textColor;
|
|
|
UIColor *textColor;
|
|
|
|
|
|
|
|
|
if (firstVersionPart == 2020) {
|
|
|
|
|
|
|
|
|
if (firstVersionPart >= 2021) {
|
|
|
|
|
|
|
|
|
|
|
|
RUIThemeGuidance *themeGuidance = [%c(RUIThemeGuidance) sharedGuidance];
|
|
|
|
|
|
textColor = [[themeGuidance currentTheme] bodyTextColor];
|
|
|
|
|
|
|
|
|
|
|
|
} else if (firstVersionPart == 2020) {
|
|
|
if (secondVersionPart <= 40) {
|
|
|
if (secondVersionPart <= 40) {
|
|
|
|
|
|
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
CommentTreeHeaderNode *headerNode = [commentTreeNode commentTreeHeaderNode];
|
|
|
CommentTreeHeaderNode *headerNode = [commentTreeNode commentTreeHeaderNode];
|
|
|
|
|
|
|
|
|
[headerNode updateContentViewsForData:comment];
|
|
|
[headerNode updateContentViewsForData:comment];
|
|
|
[headerNode configureNodes];
|
|
|
[headerNode configureNodes];
|
|
|
|
|
|
|
|
|
|
|
|
if (firstVersionPart >= 2021) {
|
|
|
|
|
|
CommentTreeTextNode *textNode = [[headerNode supernode] textNode];
|
|
|
|
|
|
[textNode configureTextNode];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
[bodyMutableAttributedText release];
|
|
|
[bodyMutableAttributedText release];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
%end
|
|
|
%end
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
%hook Post
|
|
|
|
|
|
|
|
|
|
|
|
- (id)previewTextWithTheme:(id)arg1 {
|
|
|
|
|
|
%log;
|
|
|
|
|
|
id orig = %orig;
|
|
|
|
|
|
HBLogDebug(@"previewTextWithTheme: orig: %@", orig);
|
|
|
|
|
|
return orig;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (id)previewFeedPostTextString {
|
|
|
|
|
|
%log;
|
|
|
|
|
|
id orig = %orig;
|
|
|
|
|
|
HBLogDebug(@"previewFeedPostTextString orig: %@", orig);
|
|
|
|
|
|
return orig;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (id)previewPostText:(id)arg1 {
|
|
|
|
|
|
%log;
|
|
|
|
|
|
id orig = %orig;
|
|
|
|
|
|
HBLogDebug(@"previewPostText: orig: %@", orig);
|
|
|
|
|
|
return orig;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%end
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
%hook PostDetailViewController
|
|
|
%hook PostDetailViewController
|
|
|
%property(strong,nonatomic) id feedPostTextWithThumbnailNode;
|
|
|
%property(strong,nonatomic) id feedPostTextWithThumbnailNode;
|
|
|
|
|
|
|
|
|
%orig;
|
|
|
%orig;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)handleDidSelectActionSheetItem:(id)arg1 {
|
|
|
- (void)handleDidSelectActionSheetItem:(id)arg1 {
|
|
|
%orig;
|
|
|
%orig;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Post *feedPost = [titleNode post];
|
|
|
Post *feedPost = [titleNode post];
|
|
|
[feedPost setAuthor:author];
|
|
|
[feedPost setAuthor:author];
|
|
|
|
|
|
|
|
|
if (firstVersionPart == 2020) {
|
|
|
|
|
|
|
|
|
if (firstVersionPart >= 2021) {
|
|
|
|
|
|
RichTextDisplayNode *selfTextNode = [[[[[self postActionSheetDelegate] controller] feedPostDetailCellNode] contentNode] selfTextNode];
|
|
|
|
|
|
[selfTextNode setAttributedText:bodyMutableAttributedText];
|
|
|
|
|
|
[selfTextNode configureDisplayNodes];
|
|
|
|
|
|
[titleNode configureNodes];
|
|
|
|
|
|
|
|
|
|
|
|
} else if (firstVersionPart == 2020) {
|
|
|
if (secondVersionPart >= 42) {
|
|
|
if (secondVersionPart >= 42) {
|
|
|
RichTextDisplayNode *selfTextNode = [[[[[self postActionSheetDelegate] controller] feedPostDetailCellNode] contentNode] selfTextNode];
|
|
|
RichTextDisplayNode *selfTextNode = [[[[[self postActionSheetDelegate] controller] feedPostDetailCellNode] contentNode] selfTextNode];
|
|
|
[selfTextNode setAttributedText:bodyMutableAttributedText];
|
|
|
[selfTextNode setAttributedText:bodyMutableAttributedText];
|
|
|
|
|
|
|
|
|
[commentsViewController reloadCommentsWithNewCommentsHighlight:NO autoScroll:NO animated:NO];
|
|
|
[commentsViewController reloadCommentsWithNewCommentsHighlight:NO autoScroll:NO animated:NO];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-(id) initWithFrame:(id)arg1{
|
|
|
-(id) initWithFrame:(id)arg1{
|
|
|
id orig = %orig;
|
|
|
id orig = %orig;
|
|
|
id commandView = [self commandView];
|
|
|
id commandView = [self commandView];
|
|
|
|
|
|
|
|
|
return orig;
|
|
|
return orig;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%end
|
|
|
%end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)prefsChanged, CFSTR("com.lint.undelete.prefs.changed"), NULL, CFNotificationSuspensionBehaviorCoalesce);
|
|
|
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)prefsChanged, CFSTR("com.lint.undelete.prefs.changed"), NULL, CFNotificationSuspensionBehaviorCoalesce);
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
if (firstVersionPart == 4 || firstVersionPart == 2020) {
|
|
|
|
|
|
if (secondVersionPart <= 32 && firstVersionPart != 2020) {
|
|
|
|
|
|
%init(Reddit_v4_ios10);
|
|
|
|
|
|
} else{
|
|
|
|
|
|
%init(Reddit_v4_current);
|
|
|
|
|
|
}
|
|
|
|
|
|
} else if (firstVersionPart == 3) {
|
|
|
|
|
|
%init(Reddit_v3);
|
|
|
|
|
|
}
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
if (firstVersionPart >= 2020 || (firstVersionPart == 4 && secondVersionPart > 32)) {
|
|
|
if (firstVersionPart >= 2020 || (firstVersionPart == 4 && secondVersionPart > 32)) {
|
|
|
%init(Reddit_v4_current);
|
|
|
%init(Reddit_v4_current);
|
|
|
} else if (firstVersionPart == 4 && secondVersionPart <= 32) {
|
|
|
} else if (firstVersionPart == 4 && secondVersionPart <= 32) {
|