@@ -8,8 +8,31 @@ private func showHighQualityPopUp() {
88 )
99}
1010
11+ private func showPlaylistDownloadingPopUp( _ isPlaylist: Bool , onSecondaryClick: ( ( ) -> Void ) ? ) {
12+ PopUpHelper . showPopUp (
13+ message: " playlist_downloading_popup " . localized,
14+ buttonText: " OK " . uiKitLocalized,
15+ secondButtonText: isPlaylist
16+ ? " download_local_playlist " . localized
17+ : nil ,
18+ onSecondaryClick: onSecondaryClick
19+ )
20+ }
21+
22+ //
23+
24+ class StreamQualitySettingsSectionHook : ClassHook < NSObject > {
25+ typealias Group = IOS14PremiumPatchingGroup
26+ static let targetName = " StreamQualitySettingsSection "
27+
28+ func shouldResetSelection( ) -> Bool {
29+ showHighQualityPopUp ( )
30+ return true
31+ }
32+ }
33+
1134class ListRowInteractionListenerViewHook : ClassHook < UIView > {
12- typealias Group = ModernPremiumPatchingGroup
35+ typealias Group = NonIOS14PremiumPatchingGroup
1336 static let targetName = " _TtC15Settings_ECMKit30ListRowInteractionListenerView "
1437
1538 func performAction( ) {
@@ -25,18 +48,10 @@ class ListRowInteractionListenerViewHook: ClassHook<UIView> {
2548 }
2649}
2750
28- class StreamQualitySettingsSectionHook : ClassHook < NSObject > {
29- typealias Group = LegacyPremiumPatchingGroup
30- static let targetName = " StreamQualitySettingsSection "
31-
32- func shouldResetSelection( ) -> Bool {
33- showHighQualityPopUp ( )
34- return true
35- }
36- }
51+ //
3752
3853class ContentOffliningUIHelperImplementationHook : ClassHook < NSObject > {
39- typealias Group = BasePremiumPatchingGroup
54+ typealias Group = IOS14And15PremiumPatchingGroup
4055 static let targetName = " Offline_ContentOffliningUIImpl.ContentOffliningUIHelperImplementation "
4156
4257 func downloadToggledWithCurrentAvailability(
@@ -48,13 +63,9 @@ class ContentOffliningUIHelperImplementationHook: ClassHook<NSObject> {
4863 ) {
4964 let isPlaylist = Dynamic . convert ( pageURI, to: SPTURL . self)
5065 . isPlaylistURL ( )
51-
52- PopUpHelper . showPopUp (
53- message: " playlist_downloading_popup " . localized,
54- buttonText: " OK " . uiKitLocalized,
55- secondButtonText: isPlaylist
56- ? " download_local_playlist " . localized
57- : nil ,
66+
67+ showPlaylistDownloadingPopUp (
68+ isPlaylist,
5869 onSecondaryClick: isPlaylist
5970 ? {
6071 self . orig. downloadToggledWithCurrentAvailability (
@@ -69,3 +80,36 @@ class ContentOffliningUIHelperImplementationHook: ClassHook<NSObject> {
6980 )
7081 }
7182}
83+
84+ class ContentOffliningUIHelperImplementationModernHook : ClassHook < NSObject > {
85+ typealias Group = LatestPremiumPatchingGroup
86+ static let targetName = " Offline_ContentOffliningUIImpl.ContentOffliningUIHelperImplementation "
87+
88+ func downloadToggledWithCurrentAvailability(
89+ _ availability: NSInteger ,
90+ addAction: NSObject ,
91+ removeAction: NSObject ,
92+ pageIdentifier: NSString ,
93+ pageURI: NSURL ,
94+ interactionID: NSString
95+ ) {
96+ let isPlaylist = Dynamic . convert ( pageURI, to: SPTURL . self)
97+ . isPlaylistURL ( )
98+
99+ showPlaylistDownloadingPopUp (
100+ isPlaylist,
101+ onSecondaryClick: isPlaylist
102+ ? {
103+ self . orig. downloadToggledWithCurrentAvailability (
104+ availability,
105+ addAction: addAction,
106+ removeAction: removeAction,
107+ pageIdentifier: pageIdentifier,
108+ pageURI: pageURI,
109+ interactionID: interactionID
110+ )
111+ }
112+ : nil
113+ )
114+ }
115+ }
0 commit comments