mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
#1451 (small tweaks)
This commit is contained in:
parent
6d85795cb7
commit
a93b27531e
6 changed files with 49 additions and 31 deletions
|
@ -1392,7 +1392,7 @@
|
|||
}
|
||||
|
||||
- (UITableViewCell *)makeLoadingCell {
|
||||
NSInteger height = 40;
|
||||
NSInteger height = 41;
|
||||
UITableViewCell *cell = [[UITableViewCell alloc]
|
||||
initWithStyle:UITableViewCellStyleSubtitle
|
||||
reuseIdentifier:@"NoReuse"];
|
||||
|
@ -2105,14 +2105,15 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state
|
|||
[self.appDelegate hidePopoverAnimated:YES];
|
||||
|
||||
void (^pop)(void) = ^{
|
||||
if (!self.isPhoneOrCompact) {
|
||||
[self.appDelegate showFeedsListAnimated:YES];
|
||||
// if (!self.isPhoneOrCompact) {
|
||||
// [self.appDelegate.feedsNavigationController popToRootViewControllerAnimated:YES];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self.appDelegate.masterContainerViewController transitionFromFeedDetail];
|
||||
} else {
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.appDelegate.masterContainerViewController transitionFromFeedDetail];
|
||||
// } else {
|
||||
// [self.appDelegate.feedsNavigationController popToViewController:[self.appDelegate.feedsNavigationController.viewControllers objectAtIndex:0] animated:YES];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
}
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// }
|
||||
};
|
||||
|
||||
[storiesCollection calculateStoryLocations];
|
||||
|
|
|
@ -921,7 +921,8 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
|
|||
|
||||
- (IBAction)tapAddSite:(id)sender {
|
||||
// [self.appDelegate.addSiteNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self.appDelegate showFeedsListAnimated:NO];
|
||||
|
||||
[self.appDelegate showPopoverWithViewController:self.appDelegate.addSiteNavigationController contentSize:CGSizeMake(320, 96) barButtonItem:self.addBarButton];
|
||||
|
||||
|
@ -2313,6 +2314,7 @@ heightForHeaderInSection:(NSInteger)section {
|
|||
[appDelegate.folderCountCache removeObjectForKey:@"everything"];
|
||||
yellowIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"g_icn_unread"]];
|
||||
[userInfoView addSubview:yellowIcon];
|
||||
yellowIcon.hidden = YES;
|
||||
|
||||
neutralCount = [[UILabel alloc] init];
|
||||
neutralCount.font = [UIFont fontWithName:@"WhitneySSm-Book" size:12];
|
||||
|
@ -2322,6 +2324,7 @@ heightForHeaderInSection:(NSInteger)section {
|
|||
|
||||
greenIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"g_icn_focus"]];
|
||||
[userInfoView addSubview:greenIcon];
|
||||
greenIcon.hidden = YES;
|
||||
|
||||
positiveCount = [[UILabel alloc] init];
|
||||
positiveCount.font = [UIFont fontWithName:@"WhitneySSm-Book" size:12];
|
||||
|
@ -2365,6 +2368,9 @@ heightForHeaderInSection:(NSInteger)section {
|
|||
CGRectGetMinY(greenIcon.frame) - 2, 100, 16);
|
||||
[positiveCount sizeToFit];
|
||||
|
||||
yellowIcon.hidden = NO;
|
||||
greenIcon.hidden = NO;
|
||||
|
||||
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
|
||||
NSString *appUnreadBadge = [prefs stringForKey:@"app_unread_badge"];
|
||||
if ([appUnreadBadge isEqualToString:@"unread"]) {
|
||||
|
|
|
@ -266,7 +266,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
self.appDelegate.compactWidth = isCompact ? size.width : 0.0;
|
||||
// self.appDelegate.compactWidth = isCompact ? size.width : 0.0;
|
||||
|
||||
self.masterNavigationController.view.frame = CGRectMake(0, 0, self.masterWidth, self.view.bounds.size.height);
|
||||
|
||||
|
@ -285,9 +285,9 @@
|
|||
}
|
||||
|
||||
- (NSInteger)masterWidth {
|
||||
if (self.appDelegate.isCompactWidth) {
|
||||
return self.appDelegate.compactWidth;
|
||||
}
|
||||
// if (self.appDelegate.isCompactWidth) {
|
||||
// return self.appDelegate.compactWidth;
|
||||
// }
|
||||
|
||||
UIInterfaceOrientation orientation = self.appDelegate.window.windowScene.interfaceOrientation;
|
||||
if (UIInterfaceOrientationIsLandscape(orientation)) {
|
||||
|
|
|
@ -288,7 +288,7 @@ SFSafariViewControllerDelegate> {
|
|||
@property (nonatomic, readwrite) BOOL hasQueuedSavedStories;
|
||||
@property (nonatomic, readonly) BOOL showingSafariViewController;
|
||||
@property (nonatomic, readonly) BOOL isCompactWidth;
|
||||
@property (nonatomic) CGFloat compactWidth;
|
||||
//@property (nonatomic) CGFloat compactWidth;
|
||||
|
||||
@property (nonatomic, strong) void (^backgroundCompletionHandler)(UIBackgroundFetchResult);
|
||||
|
||||
|
@ -378,6 +378,7 @@ SFSafariViewControllerDelegate> {
|
|||
- (void)showSafariViewControllerWithURL:(NSURL *)url useReader:(BOOL)useReader;
|
||||
- (void)closeOriginalStory;
|
||||
- (void)hideStoryDetailView;
|
||||
- (void)showFeedsListAnimated:(BOOL)animated;
|
||||
- (void)changeActiveFeedDetailRow;
|
||||
- (void)showShareView:(NSString *)type setUserId:(NSString *)userId setUsername:(NSString *)username setReplyId:(NSString *)commentIndex;
|
||||
- (void)hideShareView:(BOOL)resetComment;
|
||||
|
|
|
@ -377,13 +377,13 @@
|
|||
} else if ([type startsWith:prefix]) {
|
||||
type = [type substringFromIndex:[prefix length]];
|
||||
if ([type isEqualToString:@"AddFeed"]) {
|
||||
[self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self performSelector:@selector(delayedAddSite) withObject:nil afterDelay:0.0];
|
||||
} else if ([type isEqualToString:@"AllStories"]) {
|
||||
[self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self.feedsViewController didSelectSectionHeaderWithTag:2];
|
||||
} else if ([type isEqualToString:@"Search"]) {
|
||||
[self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self.feedsViewController didSelectSectionHeaderWithTag:2];
|
||||
self.feedDetailViewController.storiesCollection.searchQuery = @"";
|
||||
self.feedDetailViewController.storiesCollection.savedSearchQuery = nil;
|
||||
|
@ -1576,7 +1576,8 @@
|
|||
[self loadFeedDetailView];
|
||||
} else if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
// [self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self showFeedsListAnimated:NO];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self hidePopoverAnimated:NO completion:^{
|
||||
if (self.feedsNavigationController.presentedViewController) {
|
||||
[self.feedsNavigationController dismissViewControllerAnimated:NO completion:^{
|
||||
|
@ -1622,7 +1623,8 @@
|
|||
[self loadFeedDetailView];
|
||||
} else if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
// [self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self hidePopoverAnimated:YES completion:^{
|
||||
if (self.feedsNavigationController.presentedViewController) {
|
||||
[self.feedsNavigationController dismissViewControllerAnimated:YES completion:^{
|
||||
|
@ -1639,7 +1641,8 @@
|
|||
showFindingStory:(BOOL)showHUD {
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
// [self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self.feedsNavigationController dismissViewControllerAnimated:YES completion:nil];
|
||||
[self hidePopoverAnimated:NO];
|
||||
}
|
||||
|
@ -1721,7 +1724,8 @@
|
|||
}
|
||||
|
||||
- (BOOL)isCompactWidth {
|
||||
return self.compactWidth > 0.0;
|
||||
return self.window.windowScene.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassCompact;
|
||||
//return self.compactWidth > 0.0;
|
||||
}
|
||||
|
||||
- (void)confirmLogout {
|
||||
|
@ -1913,7 +1917,8 @@
|
|||
showFindingStory:(BOOL)showHUD {
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
// [self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self.feedsNavigationController dismissViewControllerAnimated:YES completion:nil];
|
||||
[self hidePopoverAnimated:NO];
|
||||
}
|
||||
|
@ -2244,12 +2249,15 @@
|
|||
}
|
||||
|
||||
- (void)hideStoryDetailView {
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnSupplementary];
|
||||
// if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
|
||||
// [self.masterContainerViewController transitionFromFeedDetail];
|
||||
// } else {
|
||||
// [self.feedsNavigationController popViewControllerAnimated:YES];
|
||||
// }
|
||||
[self showFeedsListAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)showFeedsListAnimated:(BOOL)animated {
|
||||
if (self.splitViewController.isCollapsed) {
|
||||
[self.feedsNavigationController popToRootViewControllerAnimated:YES];
|
||||
} else {
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnSupplementary];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
@ -2258,20 +2266,23 @@
|
|||
- (void)handleUserActivity:(NSUserActivity *)activity {
|
||||
if ([activity.activityType isEqualToString:@"com.newsblur.refresh"]) {
|
||||
// [self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self.feedsViewController refreshFeedList];
|
||||
} else if ([activity.activityType isEqualToString:@"com.newsblur.gotoFolder"]) {
|
||||
NSString *folder = activity.userInfo[@"folder"];
|
||||
|
||||
// [self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self loadRiverFeedDetailView:self.feedDetailViewController withFolder:folder];
|
||||
} else if ([activity.activityType isEqualToString:@"com.newsblur.gotoFeed"]) {
|
||||
NSString *folder = activity.userInfo[@"folder"];
|
||||
NSString *feedID = activity.userInfo[@"feedID"];
|
||||
|
||||
// [self.feedsNavigationController popToRootViewControllerAnimated:NO];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
// [self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
|
||||
[self showFeedsListAnimated:NO];
|
||||
[self loadFolder:folder feedID:feedID];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1847,7 +1847,6 @@
|
|||
// popToViewController:[appDelegate.feedsNavigationController.viewControllers
|
||||
// objectAtIndex:0]
|
||||
// animated:YES];
|
||||
[self.splitViewController showColumn:UISplitViewControllerColumnSupplementary];
|
||||
[appDelegate hideStoryDetailView];
|
||||
} else {
|
||||
[self changePage:nextLocation];
|
||||
|
|
Loading…
Add table
Reference in a new issue