Merge branch 'dejal' into catalyst
|
@ -12,6 +12,8 @@
|
|||
<a href="https://play.google.com/store/apps/details?id=com.newsblur" target="_blank">
|
||||
<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/></a>
|
||||
|
||||
<a href="https://apps.apple.com/us/app/newsblur/id463981119"><img src="https://tools.applemediaservices.com/api/badges/download-on-the-app-store/black/en-us?size=250x83" alt="Download on the Apple App Store" height="55"></a>
|
||||
|
||||
## Features
|
||||
|
||||
1. Shows the original site (you have to see it to believe it).
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
NewsBlur is a personal <i>news reader<i> bringing people together to talk about the world. Share stories, read your feed subscriptions, and talk to like minded people with this free service. A new sound of an old instrument.
|
||||
|
||||
Google Reader has left us and we are working hard to be your replacement. We have many fixes and enhancements planned for all our NewsBlur offerings so stay tuned.
|
||||
|
||||
<b>Features:<b>
|
||||
<ul>
|
||||
<li>Synchronizes with NewsBlur servers so keep your stories and read/unread status consistent<li>
|
||||
<li>Read all of your news subscriptions (RSS feeds)<li>
|
||||
<li>Read while offline and re-sync read and saved stories when online again.<li>
|
||||
<li>Share and comment on the news with friends<li>
|
||||
<li>Multiple device support (Web, Android, iOS)<li>
|
||||
<li>Meet new people who share the same interests<li>
|
||||
<li>Collapsible folders<li>
|
||||
<li>Save stories<li>
|
||||
<li>Dark mode for night time reading<li>
|
||||
<li>Multiple viewing options for stories<li>
|
||||
<li>Training your feeds - Hide the stories you don't like and highlight the stories you do.<li>
|
||||
<li>River of news - show stories from several different feeds in a single view<li>
|
||||
<ul>
|
||||
|
||||
https://www.newsblur.com/
|
BIN
clients/android/fastlane/metadata/android/en-US/images/icon.png
Normal file
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 197 KiB |
After Width: | Height: | Size: 207 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 108 KiB |
|
@ -0,0 +1 @@
|
|||
Powerful & customizable personal news reader.
|
|
@ -0,0 +1 @@
|
|||
NewsBlur - News reader
|
|
@ -541,7 +541,7 @@ private extension DetailViewController {
|
|||
|
||||
dividerViewBottomConstraint.constant = dividerPosition
|
||||
|
||||
appDelegate.updateSplitBehavior()
|
||||
appDelegate.updateSplitBehavior(true)
|
||||
wasGrid = false
|
||||
}
|
||||
|
||||
|
|
|
@ -897,8 +897,15 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
|
|||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && finished) {
|
||||
[self cacheFeedRowLocations];
|
||||
}
|
||||
[self loadNotificationStory];
|
||||
|
||||
|
||||
if (appDelegate.pendingFolder != nil) {
|
||||
if ([appDelegate splitUnreadCountForFolder:appDelegate.pendingFolder].nt > 0) {
|
||||
[self loadNotificationStory];
|
||||
}
|
||||
} else {
|
||||
[self loadNotificationStory];
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"FinishedLoadingFeedsNotification" object:nil];
|
||||
}
|
||||
|
||||
|
@ -1359,7 +1366,7 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
|
|||
}
|
||||
|
||||
if ([identifier isEqualToString:@"split_behavior"]) {
|
||||
[self.appDelegate updateSplitBehavior];
|
||||
[self.appDelegate updateSplitBehavior:YES];
|
||||
} else if ([identifier isEqualToString:@"feed_list_sort_order"]) {
|
||||
[self.appDelegate reloadFeedsView:YES];
|
||||
} else if ([identifier isEqual:@"feed_list_font_size"]) {
|
||||
|
|
|
@ -158,6 +158,7 @@ SFSafariViewControllerDelegate> {
|
|||
|
||||
@property (class, nonatomic, readonly) NewsBlurAppDelegate *shared;
|
||||
|
||||
@property (nonatomic, readonly) NSURL *documentsURL;
|
||||
@property (nonatomic) SplitViewController *splitViewController;
|
||||
@property (nonatomic) IBOutlet UINavigationController *ftuxNavigationController;
|
||||
@property (nonatomic) IBOutlet UINavigationController *feedsNavigationController;
|
||||
|
@ -320,7 +321,7 @@ SFSafariViewControllerDelegate> {
|
|||
- (void)showOrganizeSites;
|
||||
- (void)showWidgetSites;
|
||||
- (void)showPremiumDialog;
|
||||
- (void)updateSplitBehavior;
|
||||
- (void)updateSplitBehavior:(BOOL)refresh;
|
||||
- (void)addSplitControlToMenuController:(MenuViewController *)menuViewController;
|
||||
- (void)showPreferences;
|
||||
- (void)setHiddenPreferencesAnimated:(BOOL)animated;
|
||||
|
|
|
@ -849,7 +849,7 @@
|
|||
[self.premiumViewController.view setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)updateSplitBehavior {
|
||||
- (void)updateSplitBehavior:(BOOL)refresh {
|
||||
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
|
||||
NSString *behavior = [preferences stringForKey:@"split_behavior"];
|
||||
|
||||
|
@ -877,7 +877,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
[self.storyPagesViewController refreshPages];
|
||||
if (refresh) {
|
||||
[self.storyPagesViewController refreshPages];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)addSplitControlToMenuController:(MenuViewController *)menuViewController {
|
||||
|
@ -887,7 +889,7 @@
|
|||
|
||||
[menuViewController addSegmentedControlWithTitles:titles values:values preferenceKey:preferenceKey selectionShouldDismiss:YES handler:^(NSUInteger selectedIndex) {
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
[self updateSplitBehavior];
|
||||
[self updateSplitBehavior:YES];
|
||||
}];
|
||||
[self.detailViewController updateLayoutWithReload:NO];
|
||||
}];
|
||||
|
@ -1206,8 +1208,7 @@
|
|||
self.firstTimeUserAddFriendsViewController = [FirstTimeUserAddFriendsViewController new];
|
||||
self.firstTimeUserAddNewsBlurViewController = [FirstTimeUserAddNewsBlurViewController new];
|
||||
|
||||
// [self.detailViewController prepare];
|
||||
[self updateSplitBehavior];
|
||||
[self updateSplitBehavior:NO];
|
||||
}
|
||||
|
||||
- (StoryPagesViewController *)storyPagesViewController {
|
||||
|
@ -4029,11 +4030,9 @@
|
|||
#pragma mark Storing Stories for Offline
|
||||
|
||||
// Returns the URL to the application's Documents directory.
|
||||
- (NSURL *)applicationDocumentsDirectory
|
||||
- (NSURL *)documentsURL
|
||||
{
|
||||
NSLog(@" ---> DB dir: %@",[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);
|
||||
|
||||
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
|
||||
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject];
|
||||
}
|
||||
|
||||
- (NSInteger)databaseSchemaVersion:(FMDatabase *)db {
|
||||
|
@ -4046,35 +4045,28 @@
|
|||
return version;
|
||||
}
|
||||
|
||||
- (void)copyFrom:(NSURL *)sourceFolderURL to:(NSURL *)destFolderURL name:(NSString *)filename isDirectory:(BOOL)isDirectory {
|
||||
NSURL *sourceURL = [sourceFolderURL URLByAppendingPathComponent:filename isDirectory:isDirectory];
|
||||
NSURL *destURL = [destFolderURL URLByAppendingPathComponent:filename isDirectory:isDirectory];
|
||||
|
||||
[[NSFileManager defaultManager] copyItemAtURL:sourceURL toURL:destURL error:nil];
|
||||
}
|
||||
|
||||
- (void)createDatabaseConnection {
|
||||
NSError *error;
|
||||
|
||||
// Remove the deletion of old sqlite dbs past version 3.1, once everybody's
|
||||
// upgraded and removed the old files.
|
||||
NSURL *documentsURL = self.documentsURL;
|
||||
NSFileManager *fileManager = [[NSFileManager alloc] init];
|
||||
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString *oldDBPath = [documentPaths objectAtIndex:0];
|
||||
NSArray *directoryContents = [fileManager contentsOfDirectoryAtPath:oldDBPath error:&error];
|
||||
int removed = 0;
|
||||
|
||||
if (error == nil) {
|
||||
for (NSString *path in directoryContents) {
|
||||
NSString *fullPath = [oldDBPath stringByAppendingPathComponent:path];
|
||||
if ([fullPath hasSuffix:@".sqlite"]) {
|
||||
[fileManager removeItemAtPath:fullPath error:&error];
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (removed) {
|
||||
NSLog(@"Deleted %d sql dbs.", removed);
|
||||
}
|
||||
|
||||
NSArray *cachePaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSString *dbPath = [cachePaths objectAtIndex:0];
|
||||
NSString *dbPath = documentsURL.path;
|
||||
NSString *dbName = [NSString stringWithFormat:@"%@.sqlite", self.host];
|
||||
NSString *path = [dbPath stringByAppendingPathComponent:dbName];
|
||||
[self applicationDocumentsDirectory];
|
||||
|
||||
// Move data from Caches directory to Documents directory.
|
||||
if (![fileManager fileExistsAtPath:path]) {
|
||||
NSURL *oldURL = [[fileManager URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] firstObject];
|
||||
[self copyFrom:oldURL to:documentsURL name:@"com.pinterest.PINDiskCache.NBFavicons" isDirectory:YES];
|
||||
[self copyFrom:oldURL to:documentsURL name:@"com.pinterest.PINDiskCache.NBStoryImages" isDirectory:YES];
|
||||
[self copyFrom:oldURL to:documentsURL name:@"story_images" isDirectory:YES];
|
||||
[self copyFrom:oldURL to:documentsURL name:dbName isDirectory:YES];
|
||||
}
|
||||
|
||||
database = [FMDatabaseQueue databaseQueueWithPath:path];
|
||||
[database inDatabase:^(FMDatabase *db) {
|
||||
|
@ -4102,8 +4094,7 @@
|
|||
// [db executeUpdate:@"drop table if exists `queued_saved_hashes`"]; // Nope, don't clear this.
|
||||
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSString *cacheDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"story_images"];
|
||||
NSString *cacheDirectory = [self.documentsURL.path stringByAppendingPathComponent:@"story_images"];
|
||||
NSError *error = nil;
|
||||
BOOL success = [fileManager removeItemAtPath:cacheDirectory error:&error];
|
||||
if (!success || error) {
|
||||
|
@ -4241,8 +4232,7 @@
|
|||
[db executeUpdate:indexUsersUserId];
|
||||
|
||||
NSError *error;
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSString *storyImagesDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"story_images"];
|
||||
NSString *storyImagesDirectory = [self.documentsURL.path stringByAppendingPathComponent:@"story_images"];
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:storyImagesDirectory]) {
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:storyImagesDirectory
|
||||
withIntermediateDirectories:NO
|
||||
|
@ -4735,8 +4725,7 @@
|
|||
|
||||
NSFileManager *fileManager = [[NSFileManager alloc] init];
|
||||
NSError *error = nil;
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSString *cacheDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"story_images"];
|
||||
NSString *cacheDirectory = [self.documentsURL.path stringByAppendingPathComponent:@"story_images"];
|
||||
NSArray *directoryContents = [fileManager contentsOfDirectoryAtPath:cacheDirectory error:&error];
|
||||
int removed = 0;
|
||||
|
||||
|
|
|
@ -391,7 +391,7 @@
|
|||
NSString* urlString = activeUrl;
|
||||
NSURL* url = [NSURL URLWithString:urlString];
|
||||
// if ([urlString containsString:@"story_images"]) {
|
||||
// NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
// NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
// NSString *storyImagesDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"story_images"];
|
||||
//
|
||||
// urlString = [urlString substringFromIndex:NSMaxRange([urlString
|
||||
|
|
|
@ -512,8 +512,7 @@
|
|||
NSString *storyHash = [self.activeStory objectForKey:@"story_hash"];
|
||||
NSArray *imageUrls = [appDelegate.activeCachedImages objectForKey:storyHash];
|
||||
if (imageUrls) {
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSString *storyImagesDirectory = [[paths objectAtIndex:0]
|
||||
NSString *storyImagesDirectory = [appDelegate.documentsURL.path
|
||||
stringByAppendingPathComponent:@"story_images"];
|
||||
for (NSString *imageUrl in imageUrls) {
|
||||
NSURL *cachedUrl = [NSURL fileURLWithPath:storyImagesDirectory];
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
int deleted = 0;
|
||||
int checked = 0;
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString *cacheDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"story_images"];
|
||||
NSDirectoryEnumerator* en = [fileManager enumeratorAtPath:cacheDirectory];
|
||||
NSDate *d = [[NSDate date] dateByAddingTimeInterval:-30*24*60*60];
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
// NSLog(@"Storing image: %@ (%d bytes - %d in queue)", storyHash, [responseData length], [imageDownloadOperationQueue requestsCount]);
|
||||
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString *cacheDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"story_images"];
|
||||
NSString *fullPath = [cacheDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", md5Url, [imageUrl pathExtension]]];
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
@implementation NBURLCache
|
||||
|
||||
- (NSString *)substitutePath:(NSString *)pathString {
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString *storyImagesDirectory = [[paths objectAtIndex:0]
|
||||
stringByAppendingPathComponent:@"story_images"];
|
||||
NSString *cachedImage = [[storyImagesDirectory
|
||||
|
|
|
@ -35,7 +35,7 @@ static NSString * const PINCacheSharedName = @"PINCacheShared";
|
|||
|
||||
- (instancetype)initWithName:(NSString *)name
|
||||
{
|
||||
return [self initWithName:name rootPath:[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]];
|
||||
return [self initWithName:name rootPath:[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithName:(NSString *)name rootPath:(NSString *)rootPath
|
||||
|
|
|
@ -79,7 +79,7 @@ typedef NS_ENUM(NSUInteger, PINDiskCacheCondition) {
|
|||
|
||||
- (instancetype)initWithName:(NSString *)name
|
||||
{
|
||||
return [self initWithName:name rootPath:[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]];
|
||||
return [self initWithName:name rootPath:[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithName:(NSString *)name rootPath:(NSString *)rootPath
|
||||
|
|