Bladeren bron

Apollo 1.8 support

master
lint 4 jaren geleden
bovenliggende
commit
942ec27c11
2 gewijzigde bestanden met toevoegingen van 48 en 9 verwijderingen
  1. +21
    -0
      tweak/Apollo.h
  2. +27
    -9
      tweak/Apollo.xm

+ 21
- 0
tweak/Apollo.h Bestand weergeven

@@ -8,6 +8,13 @@
@property(assign,nonatomic) NSString *fullName;
@end
@interface RDKComment
@property(assign,nonatomic) NSString *body;
@property(assign,nonatomic) NSString *bodyHTML;
@property(assign,nonatomic) NSString *author;
@property(assign,nonatomic) NSString *fullName;
@end
@interface CommentCellNode
@property(assign,nonatomic)id view;
-(BOOL) isSelected;
@@ -32,6 +39,16 @@
@property(strong, nonatomic) NSString *undeleteAuthor;
@end
@interface RDKLink
@property(assign,nonatomic) NSString *selfText;
@property(assign,nonatomic) NSString *author;
@property(assign,nonatomic) NSString *fullName;
-(BOOL) isSelfPost;
//custom elements
@property(strong, nonatomic) NSString *undeleteAuthor;
@end
@interface CommentsHeaderCellNode
@property(strong, nonatomic) id undeleteButton;
@property(strong, nonatomic) id closestViewController;
@@ -55,6 +72,10 @@
-(NSInteger) tableView:(id) arg1 numberOfRowsInSection:(NSInteger) arg2;
@end
@interface UIImage (ios13)
+ (id)systemImageNamed:(NSString *)arg1;
@end
@interface IconActionTableViewCell : UITableViewCell
@end

+ 27
- 9
tweak/Apollo.xm Bestand weergeven

@@ -23,11 +23,24 @@ id apolloCommentController;
%hook RKComment
-(BOOL) isDeleted{
- (BOOL)isDeleted {
return NO;
}
-(BOOL) isModeratorRemoved{
- (BOOL)isModeratorRemoved {
return NO;
}
%end
//1.8+, unsure why this is all I needed to add for 1.8 support, the rest of this still works even w/o changing RKComment and RKLink references
%hook RDKComment
- (BOOL)isDeleted {
return NO;
}
- (BOOL)isModeratorRemoved {
return NO;
}
@@ -37,13 +50,18 @@ id apolloCommentController;
%hook RKLink
%property(strong, nonatomic) NSString *undeleteAuthor;
-(id) author{
if ([self undeleteAuthor]){
return [self undeleteAuthor];
} else {
return %orig;
}
- (id)author {
return [self undeleteAuthor] ? [self undeleteAuthor] : %orig;
}
%end
%hook RDKLink
%property(strong, nonatomic) NSString *undeleteAuthor;
- (id)author {
return [self undeleteAuthor] ? [self undeleteAuthor] : %orig;
}
%end

Laden…
Annuleren
Opslaan