From cc37c84e47a5ce37f30011f2e278964134de2c4b Mon Sep 17 00:00:00 2001 From: level3tjg <11725521+level3tjg@users.noreply.github.com> Date: Sat, 17 Aug 2024 14:29:15 -0400 Subject: [PATCH] use internal generator --- Makefile | 1 + Tweak.xm | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 56fb7f4..3bc9de3 100755 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/Tweak.xm b/Tweak.xm index 754152b..8922dfe 100755 --- a/Tweak.xm +++ b/Tweak.xm @@ -8,10 +8,6 @@ #import #import "Preferences.h" -@interface UIImage () -+ (UIImage *)imageNamed:(NSString *)name inBundle:(NSBundle *)bundle; -@end - static NSMutableArray *assetBundles; extern "C" UIImage *iconWithName(NSString *iconName) { @@ -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; }