Skip to content

Commit 9865a29

Browse files
committed
Adding a custom icon that will be displayed when using grouped settings (YouGroupSettings tweak)
1 parent d271dc6 commit 9865a29

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

YTHFSHeaders.h

+11
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,15 @@
140140
// create a checkmark item with a title and select block
141141
+ (id)checkmarkItemWithTitle:(NSString *)title selectBlock:(id)selectBlock;
142142

143+
@end
144+
145+
// defined for setting an icon for grouped settings
146+
@interface GPBMessage : NSObject
147+
+ (id)parseFromData:(id)data;
148+
+ (id)parseFromData:(id)data error:(NSError **)error;
149+
- (id)firstSubmessage;
150+
- (void)clear;
151+
@end
152+
@interface YTIIcon : GPBMessage
153+
@property (nonatomic, assign, readwrite) NSUInteger iconType;
143154
@end

YTHFSSettings.x

+3-1
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,12 @@
167167

168168
// add all of our settings item to the main settings list
169169
if ([settingsViewController respondsToSelector:@selector(setSectionItems:forCategory:title:icon:titleDescription:headerHidden:)]) {
170+
YTIIcon *icon = [%c(YTIIcon) new];
171+
icon.iconType = 530; // TUNE
170172
[settingsViewController setSectionItems:mainSectionItems
171173
forCategory:kYTHFSHoldForSpeedSection
172174
title:[YTHFSPrefsManager localizedStringForKey:@"HOLD_FOR_SPEED" withDefaultValue:@"Hold for speed"]
173-
icon:nil
175+
icon:icon
174176
titleDescription:nil
175177
headerHidden:NO];
176178
} else {

control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: com.joshuaseltzer.ytholdforspeed
22
Name: YTHoldForSpeed
3-
Version: 1.2.1
3+
Version: 1.2.2
44
Architecture: iphoneos-arm
55
Description: Tap and hold on the YouTube video player to toggle a selected playback speed. Preferences for the tweak are configured within the YouTube app.
66
Maintainer: Joshua Seltzer <joshua.seltzer90@gmail.com>

0 commit comments

Comments
 (0)