mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Toggling system font size shows/hides the feed/story list font size option. Also defaulting to not use system font size.
This commit is contained in:
parent
8727b683a5
commit
09a47076d4
3 changed files with 19 additions and 8 deletions
|
@ -438,12 +438,18 @@
|
|||
preferencesViewController.showDoneButton = YES;
|
||||
preferencesViewController.showCreditsFooter = NO;
|
||||
preferencesViewController.title = @"Preferences";
|
||||
BOOL enabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"offline_allowed"];
|
||||
preferencesViewController.hiddenKeys = enabled ? nil :
|
||||
[NSSet setWithObjects:@"offline_image_download",
|
||||
@"offline_download_connection",
|
||||
@"offline_store_limit",
|
||||
nil];
|
||||
NSMutableSet *hiddenSet = [NSMutableSet set];
|
||||
BOOL offline_enabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"offline_allowed"];
|
||||
if (offline_enabled) {
|
||||
[hiddenSet addObjectsFromArray:@[@"offline_image_download",
|
||||
@"offline_download_connection",
|
||||
@"offline_store_limit"]];
|
||||
}
|
||||
BOOL system_font_enabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"use_system_font_size"];
|
||||
if (system_font_enabled) {
|
||||
[hiddenSet addObjectsFromArray:@[@"feed_list_font_size"]];
|
||||
}
|
||||
preferencesViewController.hiddenKeys = hiddenSet;
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"Delete offline stories..."
|
||||
forKey:@"offline_cache_empty_stories"];
|
||||
|
||||
|
|
|
@ -881,7 +881,12 @@ static UIFont *userLabelFont;
|
|||
[NSSet setWithObjects:@"instapaper_username",
|
||||
@"instapaper_password",
|
||||
nil] animated:YES];
|
||||
}
|
||||
} else if ([notification.object isEqual:@"use_system_font_size"]) {
|
||||
BOOL enabled = (BOOL)[[notification.userInfo objectForKey:@"use_system_font_size"] intValue];
|
||||
[appDelegate.preferencesViewController setHiddenKeys:!enabled ? nil :
|
||||
[NSSet setWithObjects:@"feed_list_font_size",
|
||||
nil] animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForSpecifier:(IASKSpecifier*)specifier {
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<key>Key</key>
|
||||
<string>use_system_font_size</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
|
|
Loading…
Add table
Reference in a new issue