Browse Source

option to hide no older notifications

tags/v1.1.2
Viggo Lekdorf 4 years ago
parent
commit
0a46477722
2 changed files with 38 additions and 0 deletions
  1. +24
    -0
      Tweak.x
  2. +14
    -0
      kageprefs/Resources/Root.plist

+ 24
- 0
Tweak.x View File

static BOOL hideFolderBG; static BOOL hideFolderBG;
static BOOL hideFolderBGSB; static BOOL hideFolderBGSB;
static BOOL hideFolderDots; static BOOL hideFolderDots;
static BOOL hideNoOlderNotifs;
//static BOOL hideStatusBarLS; //static BOOL hideStatusBarLS;
static BOOL hideCCGrabber; static BOOL hideCCGrabber;


NSNumber *eHideFolderBG = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBG" inDomain:nsDomainString]; NSNumber *eHideFolderBG = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBG" inDomain:nsDomainString];
NSNumber *eHideFolderBGSB = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBGSB" inDomain:nsDomainString]; NSNumber *eHideFolderBGSB = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderBGSB" inDomain:nsDomainString];
NSNumber *eHideFolderDots = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderDots" inDomain:nsDomainString]; NSNumber *eHideFolderDots = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideFolderDots" inDomain:nsDomainString];
NSNumber *eHideNoOlderNotifs = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideNoOlderNotifs" inDomain:nsDomainString];
//NSNumber *eHideStatusBarLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideStatusBarLS" inDomain:nsDomainString]; //NSNumber *eHideStatusBarLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideStatusBarLS" inDomain:nsDomainString];
NSNumber *eHideCCGrabber = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCCGrabber" inDomain:nsDomainString]; NSNumber *eHideCCGrabber = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideCCGrabber" inDomain:nsDomainString];


hideFolderBG = (eHideFolderBG) ? [eHideFolderBG boolValue]:NO; hideFolderBG = (eHideFolderBG) ? [eHideFolderBG boolValue]:NO;
hideFolderBGSB = (eHideFolderBGSB) ? [eHideFolderBGSB boolValue]:NO; hideFolderBGSB = (eHideFolderBGSB) ? [eHideFolderBGSB boolValue]:NO;
hideFolderDots = (eHideFolderDots) ? [eHideFolderDots boolValue]:NO; hideFolderDots = (eHideFolderDots) ? [eHideFolderDots boolValue]:NO;
hideNoOlderNotifs = (eHideNoOlderNotifs) ? [eHideNoOlderNotifs boolValue]:NO;
//hideStatusBarLS = (eHideStatusBarLS) ? [eHideStatusBarLS boolValue]:NO; //hideStatusBarLS = (eHideStatusBarLS) ? [eHideStatusBarLS boolValue]:NO;
hideCCGrabber = (eHideCCGrabber) ? [eHideCCGrabber boolValue]:NO; hideCCGrabber = (eHideCCGrabber) ? [eHideCCGrabber boolValue]:NO;
} }
-(void)_closeFolderController:(id)arg1 animated:(BOOL)arg2 withCompletion:(id)arg3; -(void)_closeFolderController:(id)arg1 animated:(BOOL)arg2 withCompletion:(id)arg3;
@end @end


@interface SBUILegibilityLabel : UIView
@property (nonatomic,copy) NSString *string;
@end

@interface NCNotificationListSectionRevealHintView : UIView
@property (nonatomic,retain)SBUILegibilityLabel *revealHintTitle;
@end

/*@interface SBFloatyFolderView : SBFolderView /*@interface SBFloatyFolderView : SBFolderView
-(void)_handleOutsideTap:(id)arg1 ; -(void)_handleOutsideTap:(id)arg1 ;
@end @end


%group universal %group universal


// HIDE NO OLDER NOTIFICATIONS START //
%hook NCNotificationListSectionRevealHintView

-(void)didMoveToWindow {
%orig;
if (enabled && hideNoOlderNotifs) {
self.revealHintTitle.string = @"";
}
}

%end
// HIDE NO OLDER NOTIFICATIONS END //

// QUICK ACTIONS BG START // // QUICK ACTIONS BG START //
%hook UICoverSheetButton %hook UICoverSheetButton
-(id)_backgroundEffectsWithBrightness:(double)arg1 { -(id)_backgroundEffectsWithBrightness:(double)arg1 {

+ 14
- 0
kageprefs/Resources/Root.plist View File

<key>PostNotification</key> <key>PostNotification</key>
<string>com.yaypixxo.kage/preferences.changed</string> <string>com.yaypixxo.kage/preferences.changed</string>
</dict> </dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.yaypixxo.kage</string>
<key>key</key>
<string>hideNoOlderNotifs</string>
<key>label</key>
<string>Hide "No Older Notifications"</string>
<key>PostNotification</key>
<string>com.yaypixxo.kage/preferences.changed</string>
</dict>
<!--<dict> <!--<dict>
<key>cell</key> <key>cell</key>
<string>PSSwitchCell</string> <string>PSSwitchCell</string>

Loading…
Cancel
Save