improve the message when no blocklist url is specified

This commit is contained in:
Mitchell Livingston 2010-11-01 00:31:56 +00:00
parent 362d863c02
commit a8db86b8f3
2 changed files with 3 additions and 1 deletions

View File

@ -117,7 +117,9 @@ BlocklistDownloader * fDownloader = nil;
- (void) download: (NSURLDownload *) download didFailWithError: (NSError *) error
{
[fViewController setFailed: [error localizedDescription]];
const BOOL blankURL = [[[[download request] URL] absoluteString] isEqualToString: @""];
[fViewController setFailed: blankURL ? NSLocalizedString(@"An address of a blocklist is needed.", "blocklist fail message")
: [error localizedDescription]];
[[NSUserDefaults standardUserDefaults] setObject: [NSDate date] forKey: @"BlocklistNewLastUpdate"];
[[BlocklistScheduler scheduler] updateSchedule];

Binary file not shown.