Merge branch 'dejal'

* dejal:
  #1376 (unresponsive segmented controls in menus on iOS 14)
  #1373 (saved searches on unread)
  #1372 (download bar appears when returning to feed list)
  #1368 (block quotes color)
This commit is contained in:
Samuel Clay 2020-09-28 11:56:41 -04:00
commit 107b0ff241
9 changed files with 37 additions and 15 deletions

View file

@ -315,7 +315,7 @@
[[ThemeManager themeManager] updateSegmentedControl:self.fontSizeSegment];
[cell addSubview:self.fontSizeSegment];
[cell.contentView addSubview:self.fontSizeSegment];
return cell;
}
@ -370,7 +370,7 @@
self.themeSegmentedControl.selectedSegmentTintColor = [UIColor clearColor];
}
[cell addSubview:self.themeSegmentedControl];
[cell.contentView addSubview:self.themeSegmentedControl];
return cell;
}

View file

@ -476,7 +476,7 @@
[[ThemeManager themeManager] updateSegmentedControl:self.fontSizeSegment];
[cell addSubview:self.fontSizeSegment];
[cell.contentView addSubview:self.fontSizeSegment];
return cell;
}
@ -498,7 +498,7 @@
[[ThemeManager themeManager] updateSegmentedControl:self.lineSpacingSegment];
[cell addSubview:self.lineSpacingSegment];
[cell.contentView addSubview:self.lineSpacingSegment];
return cell;
}
@ -520,7 +520,7 @@
[[ThemeManager themeManager] updateSegmentedControl:self.fullscreenSegment];
[cell addSubview:self.fullscreenSegment];
[cell.contentView addSubview:self.fullscreenSegment];
return cell;
}
@ -542,7 +542,7 @@
[[ThemeManager themeManager] updateSegmentedControl:self.autoscrollSegment];
[cell addSubview:self.autoscrollSegment];
[cell.contentView addSubview:self.autoscrollSegment];
return cell;
}
@ -564,7 +564,7 @@
[[ThemeManager themeManager] updateSegmentedControl:self.scrollOrientationSegment];
[cell addSubview:self.scrollOrientationSegment];
[cell.contentView addSubview:self.scrollOrientationSegment];
return cell;
}
@ -597,7 +597,7 @@
[[ThemeManager themeManager] updateThemeSegmentedControl:self.themeSegment];
[cell addSubview:self.themeSegment];
[cell.contentView addSubview:self.themeSegment];
return cell;
}

View file

@ -176,7 +176,7 @@ NSString * const MenuHandler = @"handler";
segmentedControl.selectedSegmentIndex = valueIndex;
[cell addSubview:segmentedControl];
[cell.contentView addSubview:segmentedControl];
return cell;
}
@ -214,7 +214,7 @@ NSString * const MenuHandler = @"handler";
[[ThemeManager themeManager] updateSegmentedControl:segmentedControl];
[cell addSubview:segmentedControl];
[cell.contentView addSubview:segmentedControl];
return cell;
}

View file

@ -35,6 +35,7 @@ typedef enum {
@property (nonatomic, strong) UIView *accessoryView;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, assign) BOOL showing;
@property (nonatomic, assign) BOOL pendingHide;
@property (nonatomic, retain) UIView *progressBar;
@property (nonatomic) NSLayoutConstraint *topOffsetConstraint;

View file

@ -223,7 +223,8 @@
return;
}
showing = YES;
self.showing = YES;
self.pendingHide = NO;
// CGRect frame = self.frame;
// frame.size.width = self.view.frame.size.width;
// self.frame = frame;
@ -252,6 +253,7 @@
- (void)hideIn:(float)seconds {
if (!self.window) {
self.pendingHide = YES;
return;
}
@ -267,7 +269,8 @@
// self.hidden = YES;
}];
showing = NO;
self.showing = NO;
self.pendingHide = NO;
}
- (void)drawRect:(CGRect)rect{

View file

@ -253,7 +253,10 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
// [self.feedTitlesTable selectRowAtIndexPath:self.currentRowAtIndexPath
// animated:NO
// scrollPosition:UITableViewScrollPositionNone];
[self hideNotifier];
if (self.notifier.pendingHide) {
[self hideNotifier];
}
}
if (self.searchFeedIds) {
@ -1240,6 +1243,7 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
NSString *folderName = [appDelegate.dictFoldersArray objectAtIndex:indexPath.section];
id feedId = [[appDelegate.dictFolders objectForKey:folderName] objectAtIndex:indexPath.row];
NSString *feedIdStr = [NSString stringWithFormat:@"%@",feedId];
BOOL isSavedSearch = [appDelegate isSavedSearch:feedIdStr];
NSString *searchQuery = [appDelegate searchQueryForFeedId:feedIdStr];
NSString *searchFolder = [appDelegate searchFolderForFeedId:feedIdStr];
feedIdStr = [appDelegate feedIdWithoutSearchQuery:feedIdStr];
@ -1253,7 +1257,7 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
if (self.searchFeedIds && !isSaved) {
isOmitted = ![self.searchFeedIds containsObject:feedIdStr];
} else {
isOmitted = [appDelegate isFolderCollapsed:folderName] || ![self isFeedVisible:feedIdStr];
isOmitted = [appDelegate isFolderCollapsed:folderName] || !([self isFeedVisible:feedIdStr] || isSavedSearch);
}
if (isOmitted) {
@ -1797,7 +1801,9 @@ heightForHeaderInSection:(NSInteger)section {
NSDictionary *unreadCounts = self.appDelegate.dictUnreadCounts[feedId];
NSIndexPath *stillVisible = self.stillVisibleFeeds[feedId];
if (!stillVisible && self.appDelegate.isSavedStoriesIntelligenceMode) {
return [self.appDelegate savedStoriesCountForFeed:feedId] > 0 || [self.appDelegate isSavedFeed:feedId];
return [self.appDelegate savedStoriesCountForFeed:feedId] > 0 || [self.appDelegate isSavedFeed:feedId] || [self.appDelegate isSavedSearch:feedId];
} else if (!stillVisible && [self.appDelegate isSavedSearch:feedId]) {
return YES;
} else if (!stillVisible &&
appDelegate.selectedIntelligence >= 1 &&
[[unreadCounts objectForKey:@"ps"] intValue] <= 0) {

View file

@ -118,6 +118,10 @@ a:active {
background-color: #2f2f2f;
}
.NB-story blockquote p {
background-color: #2f2f2f;
}
ins {
background-color: #475D49;
text-decoration: none;

View file

@ -121,6 +121,10 @@ a:active {
background-color: #6c696a;
}
.NB-story blockquote p {
background-color: #6c696a;
}
ins {
background-color: #475D49;
text-decoration: none;

View file

@ -114,6 +114,10 @@ a:active {
background-color: #F2F2D4;
}
.NB-story blockquote p {
background-color: #F2F2D4;
}
/* Comments */
.NB-story-comments-group:last-child {