Merge branch 'dejal' into catalyst

This commit is contained in:
David Sinclair 2022-01-24 21:23:40 -08:00
commit 2b84599d9f
5 changed files with 16 additions and 8 deletions

View file

@ -81,6 +81,10 @@ static const CGFloat kFolderTitleHeight = 36.0;
self.tableView.sectionIndexColor = UIColorFromRGB(0x303030);
self.tableView.sectionIndexBackgroundColor = UIColorFromRGB(0xDCDFD6);
if (@available(iOS 15.0, *)) {
self.tableView.sectionHeaderTopPadding = 0;
}
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(finishedLoadingFeedsNotification:) name:@"FinishedLoadingFeedsNotification" object:nil];
[self updateTitle];

View file

@ -431,7 +431,6 @@ typedef NS_ENUM(NSUInteger, MarkReadShowMenu)
}
[self.notifier setNeedsLayout];
[appDelegate hideShareView:YES];
if (!storiesCollection.inSearch && storiesCollection.feedPage == 1) {
[self.storyTitlesTable setContentOffset:CGPointMake(0, CGRectGetHeight(self.searchBar.frame))];
@ -1319,6 +1318,11 @@ typedef NS_ENUM(NSUInteger, MarkReadShowMenu)
!appDelegate.tryFeedStoryId) {
if (appDelegate.activeStory == nil && [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && appDelegate.splitViewController.splitBehavior != UISplitViewControllerSplitBehaviorOverlay) {
NSInteger storyIndex = [storiesCollection indexFromLocation:0];
if (storyIndex == -1) {
return;
}
appDelegate.activeStory = [[storiesCollection activeFeedStories] objectAtIndex:storyIndex];
appDelegate.suppressMarkAsRead = YES;
[appDelegate loadStoryDetailView];

View file

@ -80,16 +80,16 @@ static UIFont *indicatorFont = nil;
}
- (NSString *)accessibilityLabel {
NSMutableString *output = [NSMutableString stringWithString:self.siteTitle];
NSMutableString *output = [NSMutableString stringWithString:self.siteTitle ?: @"no site"];
[output appendFormat:@", \"%@\"", self.storyTitle];
[output appendFormat:@", \"%@\"", self.storyTitle ?: @"no story"];
if (self.storyAuthor.length) {
[output appendFormat:@", by %@", self.storyAuthor];
[output appendFormat:@", by %@", self.storyAuthor ?: @"no author"];
}
[output appendFormat:@", at %@", self.storyDate];
[output appendFormat:@". %@", self.storyContent];
[output appendFormat:@", at %@", self.storyDate ?: @"no date"];
[output appendFormat:@". %@", self.storyContent ?: @"no content"];
return output;
}

View file

@ -2277,7 +2277,7 @@
config.entersReaderIfAvailable = useReader;
NSRange prefix = [[url absoluteString] rangeOfString: @"http"];
if (NSNotFound == prefix.location) {
if (url == nil || NSNotFound == prefix.location) {
[self informError:@"URL scheme invalid"];
return;
}

View file

@ -2533,7 +2533,7 @@
[params setObject:[self.activeStory objectForKey:@"story_hash"] forKey:@"story_hash"];
[params setObject:@"true" forKey:@"show_changes"];
NSString *storyId = [self.activeStory objectForKey:@"id"];
[appDelegate POST:urlString parameters:params success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
[appDelegate GET:urlString parameters:params success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
[self finishFetchStoryChanges:responseObject storyId:storyId];
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
[self failedFetchStoryChanges:error];