diff --git a/Makefile b/Makefile index 814a6d7..a9b5734 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ARCHS = arm64 arm64e -TARGET = iphone:clang:12.2:10.0 +TARGET = iphone:clang:12.4:10.0 INSTALL_TARGET_PROCESSES = Twitter Preferences include $(THEOS)/makefiles/common.mk @@ -14,3 +14,6 @@ include $(THEOS_MAKE_PATH)/tweak.mk SUBPROJECTS += pref include $(THEOS_MAKE_PATH)/aggregate.mk + +clean:: + rm -rf .theos packages diff --git a/README.md b/README.md index 474db4d..3740787 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Free & Open Source Tweak for Twitter app on iOS! ## Features - Remove Ads +- Remove Fleets - Hide News and Trending posts in search tab - Hide who to follow section - Can Save Video (long press on video to save) diff --git a/Tweak.xm b/Tweak.xm index df3730b..e15ced7 100644 --- a/Tweak.xm +++ b/Tweak.xm @@ -4,6 +4,7 @@ * Load Preferences */ BOOL noads; +BOOL nofleets; BOOL hideNewsAndTrending; BOOL hideWhoToFollow; BOOL canSaveVideo; @@ -13,10 +14,11 @@ static void reloadPrefs() { NSDictionary *settings = [[NSMutableDictionary alloc] initWithContentsOfFile:@PLIST_PATH] ?: [@{} mutableCopy]; noads = [[settings objectForKey:@"noads"] ?: @(YES) boolValue]; - hideNewsAndTrending = [[settings objectForKey:@"hideNewsAndTrending"] ?: @(YES) boolValue]; - hideWhoToFollow = [[settings objectForKey:@"hideWhoToFollow"] ?: @(YES) boolValue]; - canSaveVideo = [[settings objectForKey:@"canSaveVideo"] ?: @(YES) boolValue]; - skipAnalyticUrl = [[settings objectForKey:@"skipAnalyticUrl"] ?: @(YES) boolValue]; + nofleets = [[settings objectForKey:@"nofleets"] ?: @(NO) boolValue]; + hideNewsAndTrending = [[settings objectForKey:@"hideNewsAndTrending"] ?: @(NO) boolValue]; + hideWhoToFollow = [[settings objectForKey:@"hideWhoToFollow"] ?: @(NO) boolValue]; + canSaveVideo = [[settings objectForKey:@"canSaveVideo"] ?: @(NO) boolValue]; + skipAnalyticUrl = [[settings objectForKey:@"skipAnalyticUrl"] ?: @(NO) boolValue]; } static void showDownloadPopup(id twStatus, UIViewController *viewController, void (^origHandler)(UIAlertAction *)) { @@ -191,6 +193,14 @@ static void showDownloadPopup(id twStatus, UIViewController *viewController, voi %end %end +%group NoFleet + %hook T1HomeTimelineItemsViewController + - (void)_t1_initializeFleets { + return; + } + %end +%end + %ctor { CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback) reloadPrefs, CFSTR(PREF_CHANGED_NOTIF), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); reloadPrefs(); @@ -204,4 +214,8 @@ static void showDownloadPopup(id twStatus, UIViewController *viewController, voi if (skipAnalyticUrl) { %init(SkipAnalyticUrl); } + + if (nofleets) { + %init(NoFleet); + } } diff --git a/control b/control index c7dfc17..9a946b3 100644 --- a/control +++ b/control @@ -1,7 +1,7 @@ Package: com.haoict.twitternoads Name: Twitter No Ads Depends: mobilesubstrate, preferenceloader, com.haoict.libhdev (>= 4.5.0), firmware (>= 10) -Version: 1.2.2 +Version: 1.3.0 Architecture: iphoneos-arm Description: Free & Open Source Tweak for Twitter Free & Open Source Tweak for Twitter @@ -9,6 +9,7 @@ Description: Free & Open Source Tweak for Twitter . Features: - Remove Ads + - Remove Fleets - Hide News and Trending posts in search tab - Hide who to follow section - Can Save Video (long press on video to save) diff --git a/pref/Resources/Root.plist b/pref/Resources/Root.plist index 03cf183..006db0d 100755 --- a/pref/Resources/Root.plist +++ b/pref/Resources/Root.plist @@ -45,7 +45,26 @@ cellClass HPSSwitchCell default - + + defaults + com.haoict.twitternoadspref + key + nofleets + label + NO_FLEETS + subtitle + REMOVE_FLEETS_IN_NEWS_FEED + PostNotification + com.haoict.twitternoadspref/PrefChanged + + + + cell + PSSwitchCell + cellClass + HPSSwitchCell + default + defaults com.haoict.twitternoadspref key @@ -64,7 +83,7 @@ cellClass HPSSwitchCell default - + defaults com.haoict.twitternoadspref key @@ -83,7 +102,7 @@ cellClass HPSSwitchCell default - + defaults com.haoict.twitternoadspref key @@ -102,7 +121,7 @@ cellClass HPSSwitchCell default - + defaults com.haoict.twitternoadspref key @@ -115,6 +134,27 @@ com.haoict.twitternoadspref/PrefChanged + + + cell + PSGroupCell + label + OTHER_PREFERENCES + + + + cell + PSLinkCell + cellClass + HPSLinkCell + defaults + com.haoict.twitternoadspref + label + RESET_SETTINGS + action + resetSettings: + + cell diff --git a/pref/Resources/base.lproj/Root.strings b/pref/Resources/base.lproj/Root.strings index 9ff6e20..0306ea4 100644 --- a/pref/Resources/base.lproj/Root.strings +++ b/pref/Resources/base.lproj/Root.strings @@ -7,6 +7,8 @@ "MAIN_PREFERENCES" = "Main Preferences"; "NO_ADS" = "No Ads"; "REMOVE_ADS_IN_NEWS_FEED" = "Remove Ads in News Feed"; + "NO_FLEETS" = "No Fleets"; + "REMOVE_FLEETS_IN_NEWS_FEED" = "Remove Fleets in News Feed"; "HIDE_NEWS_AND_TRENDING" = "Remove News And Trending"; "HIDE_NEWS_AND_TRENDING_POST_ON_SEARCH_TAB" = "Remove News And Trending post on Search tab"; "HIDE_WHO_TO_FOLLOW" = "Hide who to follow"; diff --git a/pref/Resources/en.lproj/Root.strings b/pref/Resources/en.lproj/Root.strings index 9ff6e20..0306ea4 100644 --- a/pref/Resources/en.lproj/Root.strings +++ b/pref/Resources/en.lproj/Root.strings @@ -7,6 +7,8 @@ "MAIN_PREFERENCES" = "Main Preferences"; "NO_ADS" = "No Ads"; "REMOVE_ADS_IN_NEWS_FEED" = "Remove Ads in News Feed"; + "NO_FLEETS" = "No Fleets"; + "REMOVE_FLEETS_IN_NEWS_FEED" = "Remove Fleets in News Feed"; "HIDE_NEWS_AND_TRENDING" = "Remove News And Trending"; "HIDE_NEWS_AND_TRENDING_POST_ON_SEARCH_TAB" = "Remove News And Trending post on Search tab"; "HIDE_WHO_TO_FOLLOW" = "Hide who to follow"; diff --git a/pref/Resources/vi.lproj/Root.strings b/pref/Resources/vi.lproj/Root.strings index e94dd28..ab7158b 100644 --- a/pref/Resources/vi.lproj/Root.strings +++ b/pref/Resources/vi.lproj/Root.strings @@ -7,6 +7,8 @@ "MAIN_PREFERENCES" = "Tùy chỉnh chính"; "NO_ADS" = "Gỡ quảng cáo"; "REMOVE_ADS_IN_NEWS_FEED" = "Gỡ quảng cáo ở News Feed"; + "NO_FLEETS" = "Gỡ Fleets"; + "REMOVE_FLEETS_IN_NEWS_FEED" = "Gỡ Fleets ở News Feed"; "HIDE_NEWS_AND_TRENDING" = "Ẩn Tin tức và chủ đề nổi trội"; "HIDE_NEWS_AND_TRENDING_POST_ON_SEARCH_TAB" = "Ẩn Tin tức và chủ đề nổi trội ở tab Tìm kiếm"; "HIDE_WHO_TO_FOLLOW" = "Ẩn gợi ý theo dõi"; diff --git a/release/com.haoict.twitternoads_1.3.0_iphoneos-arm.deb b/release/com.haoict.twitternoads_1.3.0_iphoneos-arm.deb new file mode 100644 index 0000000..0dc62f9 Binary files /dev/null and b/release/com.haoict.twitternoads_1.3.0_iphoneos-arm.deb differ