Procházet zdrojové kódy

Fix language bug for all supported apps

master
lint před 4 roky
rodič
revize
48c9597a01
8 změnil soubory, kde provedl 49 přidání a 51 odebrání
  1. +4
    -4
      tweak/AlienBlue.xm
  2. +4
    -4
      tweak/Antenna.xm
  3. +15
    -17
      tweak/Apollo.xm
  4. +4
    -4
      tweak/BaconReader.xm
  5. +4
    -4
      tweak/Beam.xm
  6. +6
    -6
      tweak/Narwhal.xm
  7. +8
    -8
      tweak/Reddit.xm
  8. +4
    -4
      tweak/Slide.xm

+ 4
- 4
tweak/AlienBlue.xm Zobrazit soubor

@@ -15,15 +15,15 @@ static CGFloat pushshiftRequestTimeoutValue;
- (id)initWithNode:(id)arg1 {
id orig = %orig;

NSString *body;
NSString *author;

if ([self isPostHeader]) {
body = [[arg1 post] selftext];
author = [[arg1 post] author];
} else {
body = [[(CommentNode *)arg1 comment] body];
author = [[(CommentNode *)arg1 comment] author];
}

if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:body isDeletedOnly:isTFDeletedOnly]){
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]){

CGSize refSize = [[self buttons][0] frame].size;


+ 4
- 4
tweak/Antenna.xm Zobrazit soubor

@@ -34,9 +34,9 @@ id tfAntennaCommentCell;
- (void)didLongPressCell:(id)arg1 gesture:(id)arg2 {
NSString *commentBody = [[[arg1 comment] commentText] body];
NSString *author = [[arg1 comment] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]){
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]){
tfAntennaController = self;
tfAntennaCommentCell = arg1;
shouldHaveAntennaUndeleteAction = YES;
@@ -113,10 +113,10 @@ id tfAntennaCommentCell;
BOOL isAbleToUndeletePost = NO;
id post = [[self delegate] postInternal];
NSString *postBody = [[post selfCommentText] body];
NSString *author = [post author];
if ([post isSelfPost]){
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]){
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]){
isAbleToUndeletePost = YES;
NSMutableArray *barButtons = [self defaultHeaderButtons];

+ 15
- 17
tweak/Apollo.xm Zobrazit soubor

@@ -186,9 +186,9 @@ id apolloCommentsControllerForContext;
if (!shouldApolloHaveButton){
NSString *commentBody = [MSHookIvar<RKComment *>(self, "comment") body];
NSString *author = [MSHookIvar<RKComment *>(self, "comment") author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
shouldAddUndeleteCell = YES;
apolloCommentCell = self;
apolloCommentController = nil;
@@ -202,9 +202,9 @@ id apolloCommentsControllerForContext;
if (!shouldApolloHaveButton){
NSString *commentBody = [MSHookIvar<RKComment *>(self, "comment") body];
NSString *author = [MSHookIvar<RKComment *>(self, "comment") author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
shouldAddUndeleteCell = YES;
apolloCommentCell = self;
apolloCommentController = nil;
@@ -217,13 +217,11 @@ id apolloCommentsControllerForContext;
- (void)didLoad {
%orig;
//HBLogDebug(@"didLoad - actionDelegate:%@", MSHookIvar<id>(self, "actionDelegate"));
if (shouldApolloHaveButton){
if (shouldApolloHaveButton) {
NSString *commentBody = [MSHookIvar<RKComment *>(self, "comment") body];
NSString *author = [MSHookIvar<RKComment *>(self, "comment") author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
CGFloat imageSize = 20.0f;
@@ -317,10 +315,10 @@ id apolloCommentsControllerForContext;
- (void)moreOptionsBarButtonItemTappedWithSender:(id)arg1 {
RKLink *post = MSHookIvar<RKLink *>(self, "link");
NSString *postBody = [post selfText];
NSString *author = [post author];
if ([post isSelfPost]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
shouldAddUndeleteCell = YES;
apolloCommentCell = nil;
apolloCommentController = self;
@@ -383,10 +381,10 @@ id apolloCommentsControllerForContext;
- (void)longPressedWithGestureRecognizer:(id)arg1 {
RKLink *post = MSHookIvar<RKLink *>(self, "link");
NSString *postBody = [post selfText];
NSString *author = [post author];
if ([post isSelfPost]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]){
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]){
shouldAddUndeleteCell = YES;
apolloCommentCell = nil;
apolloCommentController = self;
@@ -433,9 +431,9 @@ id apolloCommentsControllerForContext;
if (!shouldApolloHaveButton) {
NSString *commentBody = [MSHookIvar<RKComment *>(self, "comment") body];
NSString *author = [MSHookIvar<RKComment *>(self, "comment") author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
shouldAddUndeleteCellForContext = YES;
apolloCommentCellForContext = [self commentCellNode];
apolloCommentsControllerForContext = nil;
@@ -463,10 +461,10 @@ id apolloCommentsControllerForContext;
id commentsController = MSHookIvar<id>(self, "viewController");
RKLink *post = MSHookIvar<RKLink *>(commentsController, "link");
NSString *postBody = [post selfText];
NSString *author = [post author];
if ([post isSelfPost]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
shouldAddUndeleteCellForContext = YES;
apolloCommentCellForContext = nil;
apolloCommentsControllerForContext = commentsController;

+ 4
- 4
tweak/BaconReader.xm Zobrazit soubor

@@ -93,9 +93,9 @@ id tfStoryController;
- (void)showMoreCommentActions:(id)arg1 showAll:(BOOL)arg2 {
NSString *commentBody = [[arg1 comment] body];
NSString *author = [[arg1 comment] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
shouldHaveBRUndeleteAction = YES;
tfCommentCellView = arg1;
tfStoryController = self;
@@ -110,9 +110,9 @@ id tfStoryController;
- (void)menuTouchedWithSender:(id)arg1 {
if ([[self story] is_selfValue]) {
NSString *postBody = [[self story] selftext];
NSString *author = [[self story] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
shouldHaveBRUndeleteAction = YES;
tfCommentCellView = nil;
tfStoryController = self;

+ 4
- 4
tweak/Beam.xm Zobrazit soubor

@@ -25,9 +25,9 @@ static CGFloat pushshiftRequestTimeoutValue;
}
} else {
NSString *commentBody = [[self comment] content];
NSString *author = [[self comment] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
CGFloat authorTextHeight = [[self authorButton] frame].size.height;
@@ -113,9 +113,9 @@ static CGFloat pushshiftRequestTimeoutValue;
if (![self undeleteButton] && [[[self post] isSelfText] boolValue] && [MSHookIvar<id>(self, "delegate") isMemberOfClass:objc_getClass("beam.PostDetailEmbeddedViewController")]) {
NSString *postBody = [[self post] content];
NSString *author = [[self post] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
id moreButton = MSHookIvar<id>(self, "moreButton");

+ 6
- 6
tweak/Narwhal.xm Zobrazit soubor

@@ -48,9 +48,9 @@ void getUndeleteCommentData(id controller, id comment){
if (arg2 == 2) {
if ([arg1 isKindOfClass:[%c(NRTCommentTableViewCell) class]]) {
NSString *commentBody = MSHookIvar<NSString*>([arg1 comment], "_body");
NSString *author = [[arg1 comment] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]){
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]){
tfComment = [arg1 comment];
tfController = self;
shouldHaveUndeleteAction = YES;
@@ -67,9 +67,9 @@ void getUndeleteCommentData(id controller, id comment){
if ([self linkTextOffscreenCell]) {
NSString *postBody = [[self link] selfText];
NSString *author = [[self link] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
tfController = self;
tfComment = nil;
shouldHaveUndeleteAction = YES;
@@ -126,9 +126,9 @@ void getUndeleteCommentData(id controller, id comment){
if (arg2 == 2) {
if ([arg1 isKindOfClass:[%c(NRTCommentTableViewCell) class]]) {
NSString *commentBody = MSHookIvar<NSString*>([arg1 comment], "_body");
NSString *author = [[arg1 comment] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
tfComment = [arg1 comment];
tfController = self;
shouldHaveUndeleteAction = YES;

+ 8
- 8
tweak/Reddit.xm Zobrazit soubor

@@ -51,9 +51,9 @@ int secondVersionPart = 0;
- (void)setItems:(id)arg1 {
NSString *commentAuthor = [[self comment] author];
NSString *author = [[self comment] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentAuthor isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
UIImage* origImage = [UIImage imageWithContentsOfFile:@"/var/mobile/Library/Application Support/TFDidThatSay/eye160dark.png"];
@@ -206,10 +206,10 @@ int secondVersionPart = 0;
- (void)setItems:(id)arg1 {
Post *post = [self post];
NSString *postBody = [post selfText];
NSString *author = [post author];
if ([post isSelfPost]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
UIImage* origImage = [UIImage imageWithContentsOfFile:@"/var/mobile/Library/Application Support/TFDidThatSay/eye160dark.png"];
@@ -366,9 +366,9 @@ int secondVersionPart = 0;
- (void)setItems:(id)arg1 {
NSString *commentAuthor = [[self comment] author];
NSString *author = [[self comment] author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentAuthor isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
UIImage* origImage = [UIImage imageWithContentsOfFile:@"/var/mobile/Library/Application Support/TFDidThatSay/eye160dark.png"];
@@ -450,10 +450,10 @@ int secondVersionPart = 0;
- (void)setItems:(id)arg1{
Post *post = [self post];
NSString *postBody = [post selfText];
NSString *author = [post author];
if ([post isSelfPost]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
UIImage* origImage = [UIImage imageWithContentsOfFile:@"/var/mobile/Library/Application Support/TFDidThatSay/eye160dark.png"];

+ 4
- 4
tweak/Slide.xm Zobrazit soubor

@@ -265,9 +265,9 @@ static UIButton *createUndeleteButton(){
%new
- (void)addUndeleteButtonToMenu {
NSString *commentBody = [MSHookIvar<id>(self, "comment") body];
NSString *author = [MSHookIvar<id>(self, "comment") author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:commentBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
id controller = MSHookIvar<id>(self, "parent");
@@ -464,9 +464,9 @@ static UIButton *createUndeleteButton(){
if ([post isSelf]) {
NSString *postBody = [post body];
NSString *author = [post author];
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:postBody isDeletedOnly:isTFDeletedOnly]) {
if ([%c(TFHelper) shouldShowUndeleteButtonWithInfo:author isDeletedOnly:isTFDeletedOnly]) {
return YES;
}
}

Načítá se…
Zrušit
Uložit