mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Update uYouPlusSettings.xm
This commit is contained in:
parent
4f4bc5e07a
commit
b870d7e95f
1 changed files with 3 additions and 4 deletions
|
|
@ -64,6 +64,8 @@ SWITCH3(
|
|||
);
|
||||
*/
|
||||
|
||||
NSString *cacheDescription = [NSString stringWithFormat:LOC(@"Current Cache Size: %@"), GetCacheSize()];
|
||||
|
||||
static NSString *GetCacheSize() { // YTLite - @dayanch96
|
||||
NSString *cachePath = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).firstObject;
|
||||
NSArray *filesArray = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:cachePath error:nil];
|
||||
|
|
@ -332,9 +334,7 @@ extern NSBundle *uYouPlusBundle();
|
|||
|
||||
YTSettingsSectionItem *clearCache = [%c(YTSettingsSectionItem)
|
||||
itemWithTitle:@"Clear Cache"
|
||||
titleDescription:^NSString *() {
|
||||
return [NSString stringWithFormat:LOC(@"Current Cache Size: %@"), GetCacheSize()];
|
||||
}
|
||||
titleDescription:cacheDescription
|
||||
accessibilityIdentifier:nil
|
||||
detailTextBlock:nil
|
||||
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||
|
|
@ -342,7 +342,6 @@ extern NSBundle *uYouPlusBundle();
|
|||
NSString *cachePath = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).firstObject;
|
||||
[[NSFileManager defaultManager] removeItemAtPath:cachePath error:nil];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[settingsViewController.tableView reloadData];
|
||||
[[%c(YTToastResponderEvent) eventWithMessage:LOC(@"Done") firstResponder:[self parentResponder]] send];
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue