Skip to content

Commit

Permalink
Merge branch 'level3tjg:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Macleykun authored Aug 23, 2024
2 parents 5b5d2dc + cc37c84 commit 63341eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ TWEAK_NAME = RedditFilter
$(TWEAK_NAME)_FILES = $(wildcard *.x*)
$(TWEAK_NAME)_CFLAGS = -fobjc-arc -Iinclude -Wno-module-import-in-extern-c
$(TWEAK_NAME)_INJECT_DYLIBS = $(THEOS_OBJ_DIR)/RedditSideloadFix.dylib
$(TWEAK_NAME)_LOGOS_DEFAULT_GENERATOR = internal

ifeq ($(SIDELOADED),1)
SUBPROJECTS += RedditSideloadFix
Expand Down
10 changes: 4 additions & 6 deletions Tweak.xm
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
#import <objc/runtime.h>
#import "Preferences.h"

@interface UIImage ()
+ (UIImage *)imageNamed:(NSString *)name inBundle:(NSBundle *)bundle;
@end

static NSMutableArray *assetBundles;

extern "C" UIImage *iconWithName(NSString *iconName) {
Expand All @@ -25,9 +21,11 @@ extern "C" UIImage *iconWithName(NSString *iconName) {
for (NSString *iconSize in commonIconSizes) {
if (iconImage) break;
iconImage = [UIImage imageNamed:[NSString stringWithFormat:@"%@_%@", iconName, iconSize]
inBundle:bundle];
inBundle:bundle
compatibleWithTraitCollection:nil];
}
if (!iconImage) iconImage = [UIImage imageNamed:iconName inBundle:bundle];
if (!iconImage)
iconImage = [UIImage imageNamed:iconName inBundle:bundle compatibleWithTraitCollection:nil];
}
return iconImage;
}
Expand Down

0 comments on commit 63341eb

Please sign in to comment.