Merge branch 'master' into offline

# By Samuel Clay (3) and others
# Via Samuel Clay (3) and ojiikun (3)
* master:
  Turning off forked mongoengine for now.
  Fixing j/k keyboard shortcuts when story titles are hidden.
  Fixing middleware to activate users. Faulty paths resulted in paths that had a / not being recognized. Thanks to @subglass!
  Make AllStories and FolderStories views match.
  Have the All Stories view query by wildcard, not ID list.
  Moved the URL schema (http://) into NEWSBLUR_URL Introduced NEWSBLUR_HOST for couple of cases where NEWSBLUR_URL was being used as a hostname Switched default URL to https://
This commit is contained in:
Samuel Clay 2013-06-20 13:17:21 -07:00
commit 1f1aec0b53
29 changed files with 88 additions and 92 deletions

View file

@ -10,7 +10,9 @@ from django.template import Template, Context
class LastSeenMiddleware(object): class LastSeenMiddleware(object):
def process_response(self, request, response): def process_response(self, request, response):
if ((request.path in ('/', '/reader/refresh_feeds', '/reader/load_feeds')) if ((request.path == '/' or
request.path.startswith('/reader/refresh_feeds') or
request.path.startswith('/reader/load_feeds'))
and hasattr(request, 'user') and hasattr(request, 'user')
and request.user.is_authenticated()): and request.user.is_authenticated()):
hour_ago = datetime.datetime.utcnow() - datetime.timedelta(minutes=60) hour_ago = datetime.datetime.utcnow() - datetime.timedelta(minutes=60)

4
fabfile.py vendored
View file

@ -173,7 +173,7 @@ def setup_common():
setup_hosts() setup_hosts()
config_pgbouncer() config_pgbouncer()
setup_mongoengine_repo() setup_mongoengine_repo()
setup_forked_mongoengine() # setup_forked_mongoengine()
setup_pymongo_repo() setup_pymongo_repo()
setup_logrotate() setup_logrotate()
setup_nginx() setup_nginx()
@ -548,7 +548,7 @@ def setup_node():
def configure_node(): def configure_node():
sudo('rm -fr /etc/supervisor/conf.d/node.conf') sudo('rm -fr /etc/supervisor/conf.d/node.conf')
put('config/supervisor_node_unread.conf', '/etc/supervisor/conf.d/node_unread.conf', use_sudo=True) put('config/supervisor_node_unread.conf', '/etc/supervisor/conf.d/node_unread.conf', use_sudo=True)
put('config/supervisor_node_unread_ssl.conf', '/etc/supervisor/conf.d/node_unread_ssl.conf', use_sudo=True) # put('config/supervisor_node_unread_ssl.conf', '/etc/supervisor/conf.d/node_unread_ssl.conf', use_sudo=True)
put('config/supervisor_node_favicons.conf', '/etc/supervisor/conf.d/node_favicons.conf', use_sudo=True) put('config/supervisor_node_favicons.conf', '/etc/supervisor/conf.d/node_favicons.conf', use_sudo=True)
sudo('supervisorctl reload') sudo('supervisorctl reload')

View file

@ -34,10 +34,6 @@
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:paddingBottom="4dp"
android:paddingTop="2dp"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:layout_toRightOf="@id/row_item_sidebar" /> android:layout_toRightOf="@id/row_item_sidebar" />
<TextView <TextView
@ -50,7 +46,7 @@
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:textColor="@color/darkgray" android:textColor="@color/darkgray"
android:textSize="11dp" /> android:textSize="14dp" />
<TextView <TextView
android:id="@+id/row_item_title" android:id="@+id/row_item_title"

View file

@ -31,8 +31,8 @@
<ImageView <ImageView
android:id="@+id/row_item_feedicon" android:id="@+id/row_item_feedicon"
android:layout_width="17dp" android:layout_width="20dp"
android:layout_height="17dp" android:layout_height="20dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_toRightOf="@id/row_item_sidebar" /> android:layout_toRightOf="@id/row_item_sidebar" />
@ -40,6 +40,7 @@
android:id="@+id/row_item_feedtitle" android:id="@+id/row_item_feedtitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_toRightOf="@id/row_item_feedicon" android:layout_toRightOf="@id/row_item_feedicon"
android:layout_alignBottom="@id/row_item_feedicon" android:layout_alignBottom="@id/row_item_feedicon"
android:ellipsize="end" android:ellipsize="end"

View file

@ -28,7 +28,6 @@ import com.newsblur.util.StoryOrder;
public class AllStoriesItemsList extends ItemsList { public class AllStoriesItemsList extends ItemsList {
private ArrayList<String> feedIds;
private APIManager apiManager; private APIManager apiManager;
private ContentResolver resolver; private ContentResolver resolver;
@ -38,15 +37,9 @@ public class AllStoriesItemsList extends ItemsList {
setTitle(getResources().getString(R.string.all_stories)); setTitle(getResources().getString(R.string.all_stories));
feedIds = new ArrayList<String>();
apiManager = new APIManager(this); apiManager = new APIManager(this);
resolver = getContentResolver(); resolver = getContentResolver();
Cursor cursor = resolver.query(FeedProvider.FEEDS_URI, null, DatabaseConstants.getStorySelectionFromState(currentState), null, null);
while (cursor.moveToNext()) {
feedIds.add(cursor.getString(cursor.getColumnIndex(DatabaseConstants.FEED_ID)));
}
itemListFragment = (AllStoriesItemListFragment) fragmentManager.findFragmentByTag(FeedItemListFragment.FRAGMENT_TAG); itemListFragment = (AllStoriesItemListFragment) fragmentManager.findFragmentByTag(FeedItemListFragment.FRAGMENT_TAG);
if (itemListFragment == null) { if (itemListFragment == null) {
@ -78,10 +71,7 @@ public class AllStoriesItemsList extends ItemsList {
final Intent intent = new Intent(Intent.ACTION_SYNC, null, this, SyncService.class); final Intent intent = new Intent(Intent.ACTION_SYNC, null, this, SyncService.class);
intent.putExtra(SyncService.EXTRA_STATUS_RECEIVER, syncFragment.receiver); intent.putExtra(SyncService.EXTRA_STATUS_RECEIVER, syncFragment.receiver);
intent.putExtra(SyncService.SYNCSERVICE_TASK, SyncService.EXTRA_TASK_MULTIFEED_UPDATE); intent.putExtra(SyncService.SYNCSERVICE_TASK, SyncService.EXTRA_TASK_MULTIFEED_UPDATE);
intent.putExtra(SyncService.EXTRA_TASK_MULTIFEED_IDS, new String[0]); // the API will return all feeds if no IDs are passed
String[] feeds = new String[feedIds.size()];
feedIds.toArray(feeds);
intent.putExtra(SyncService.EXTRA_TASK_MULTIFEED_IDS, feeds);
intent.putExtra(SyncService.EXTRA_TASK_PAGE_NUMBER, Integer.toString(page)); intent.putExtra(SyncService.EXTRA_TASK_PAGE_NUMBER, Integer.toString(page));
intent.putExtra(SyncService.EXTRA_TASK_ORDER, getStoryOrder()); intent.putExtra(SyncService.EXTRA_TASK_ORDER, getStoryOrder());
intent.putExtra(SyncService.EXTRA_TASK_READ_FILTER, PrefsUtils.getReadFilterForFolder(this, PrefConstants.ALL_STORIES_FOLDER_NAME)); intent.putExtra(SyncService.EXTRA_TASK_READ_FILTER, PrefsUtils.getReadFilterForFolder(this, PrefConstants.ALL_STORIES_FOLDER_NAME));
@ -107,9 +97,7 @@ public class AllStoriesItemsList extends ItemsList {
values.put(DatabaseConstants.FEED_NEGATIVE_COUNT, 0); values.put(DatabaseConstants.FEED_NEGATIVE_COUNT, 0);
values.put(DatabaseConstants.FEED_NEUTRAL_COUNT, 0); values.put(DatabaseConstants.FEED_NEUTRAL_COUNT, 0);
values.put(DatabaseConstants.FEED_POSITIVE_COUNT, 0); values.put(DatabaseConstants.FEED_POSITIVE_COUNT, 0);
for (String feedId : feedIds) { resolver.update(FeedProvider.FEEDS_URI, values, null, null);
resolver.update(FeedProvider.FEEDS_URI.buildUpon().appendPath(feedId).build(), values, null, null);
}
setResult(RESULT_OK); setResult(RESULT_OK);
Toast.makeText(AllStoriesItemsList.this, R.string.toast_marked_all_stories_as_read, Toast.LENGTH_SHORT).show(); Toast.makeText(AllStoriesItemsList.this, R.string.toast_marked_all_stories_as_read, Toast.LENGTH_SHORT).show();
finish(); finish();

View file

@ -583,6 +583,8 @@ public class FeedProvider extends ContentProvider {
final SQLiteDatabase db = databaseHelper.getWritableDatabase(); final SQLiteDatabase db = databaseHelper.getWritableDatabase();
switch (uriMatcher.match(uri)) { switch (uriMatcher.match(uri)) {
case ALL_FEEDS:
return db.update(DatabaseConstants.FEED_TABLE, values, null, null);
case INDIVIDUAL_FEED: case INDIVIDUAL_FEED:
return db.update(DatabaseConstants.FEED_TABLE, values, DatabaseConstants.FEED_ID + " = ?", new String[] { uri.getLastPathSegment() }); return db.update(DatabaseConstants.FEED_TABLE, values, DatabaseConstants.FEED_ID + " = ?", new String[] { uri.getLastPathSegment() });
case INDIVIDUAL_SOCIAL_FEED: case INDIVIDUAL_SOCIAL_FEED:

View file

@ -105,7 +105,7 @@
feedId = [activity objectForKey:@"story_feed_id"]; feedId = [activity objectForKey:@"story_feed_id"];
} }
if (feedId && [feedId class] != [NSNull class]) { if (feedId && [feedId class] != [NSNull class]) {
NSString *faviconUrl = [NSString stringWithFormat:@"http://%@/rss_feeds/icon/%i", NSString *faviconUrl = [NSString stringWithFormat:@"%@/rss_feeds/icon/%i",
NEWSBLUR_URL, NEWSBLUR_URL,
[feedId intValue]]; [feedId intValue]];
[self.faviconView setImageWithURL:[NSURL URLWithString:faviconUrl] [self.faviconView setImageWithURL:[NSURL URLWithString:faviconUrl]

View file

@ -94,7 +94,7 @@
self.pageFetching = YES; self.pageFetching = YES;
self.appDelegate = (NewsBlurAppDelegate *)[[UIApplication sharedApplication] delegate]; self.appDelegate = (NewsBlurAppDelegate *)[[UIApplication sharedApplication] delegate];
NSString *urlString = [NSString stringWithFormat:@ NSString *urlString = [NSString stringWithFormat:@
"http://%@/social/activities?user_id=%@&page=%i&limit=10" "%@/social/activities?user_id=%@&page=%i&limit=10"
"&category=signup&category=star&category=feedsub&category=follow&category=comment_reply&category=comment_like&category=sharedstory", "&category=signup&category=star&category=feedsub&category=follow&category=comment_reply&category=comment_like&category=sharedstory",
NEWSBLUR_URL, NEWSBLUR_URL,
[appDelegate.dictSocialProfile objectForKey:@"user_id"], [appDelegate.dictSocialProfile objectForKey:@"user_id"],

View file

@ -199,7 +199,7 @@
} }
[self.siteActivityIndicator startAnimating]; [self.siteActivityIndicator startAnimating];
NSString *urlString = [NSString stringWithFormat:@"http://%@/rss_feeds/feed_autocomplete?term=%@&v=2", NSString *urlString = [NSString stringWithFormat:@"%@/rss_feeds/feed_autocomplete?term=%@&v=2",
NEWSBLUR_URL, [phrase stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NEWSBLUR_URL, [phrase stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIHTTPRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIHTTPRequest requestWithURL:url];
@ -259,7 +259,7 @@
[self.addingLabel setText:@"Adding site..."]; [self.addingLabel setText:@"Adding site..."];
[self.errorLabel setHidden:YES]; [self.errorLabel setHidden:YES];
[self.activityIndicator startAnimating]; [self.activityIndicator startAnimating];
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/add_url", NSString *urlString = [NSString stringWithFormat:@"%@/reader/add_url",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];

View file

@ -53,7 +53,7 @@
} else if ([type isEqualToString:@"appdotnet"]) { } else if ([type isEqualToString:@"appdotnet"]) {
self.navigationItem.title = @"App.net"; self.navigationItem.title = @"App.net";
} }
NSString *urlAddress = [NSString stringWithFormat:@"http://%@%@", NEWSBLUR_URL, url]; NSString *urlAddress = [NSString stringWithFormat:@"%@%@", NEWSBLUR_URL, url];
NSURL *fullUrl = [NSURL URLWithString:urlAddress]; NSURL *fullUrl = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:fullUrl]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:fullUrl];
[self.webView loadRequest:requestObj]; [self.webView loadRequest:requestObj];
@ -83,7 +83,7 @@
NSString *URLString = [[request URL] absoluteString]; NSString *URLString = [[request URL] absoluteString];
NSLog(@"URL STRING IS %@", URLString); NSLog(@"URL STRING IS %@", URLString);
if ([URLString isEqualToString:[NSString stringWithFormat:@"http://%@/", NEWSBLUR_URL]]) { if ([URLString isEqualToString:[NSString stringWithFormat:@"%@/", NEWSBLUR_URL]]) {
NSString *error = [self.webView stringByEvaluatingJavaScriptFromString:@"NEWSBLUR.error"]; NSString *error = [self.webView stringByEvaluatingJavaScriptFromString:@"NEWSBLUR.error"];
if (self.fromStory) { if (self.fromStory) {
@ -121,7 +121,7 @@
} }
// // for failed google reader authorization // // for failed google reader authorization
// if ([URLString hasPrefix:[NSString stringWithFormat:@"http://%@/import/callback", NEWSBLUR_URL]]) { // if ([URLString hasPrefix:[NSString stringWithFormat:@"%@/import/callback", NEWSBLUR_URL]]) {
// [self.navigationController popViewControllerAnimated:YES]; // [self.navigationController popViewControllerAnimated:YES];
// [appDelegate.firstTimeUserAddSitesViewController importFromGoogleReaderFailed]; // [appDelegate.firstTimeUserAddSitesViewController importFromGoogleReaderFailed];
// return NO; // return NO;

View file

@ -321,12 +321,12 @@
[storyTitlesTable scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES]; [storyTitlesTable scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];
} }
if (appDelegate.isSocialView) { if (appDelegate.isSocialView) {
theFeedDetailURL = [NSString stringWithFormat:@"http://%@/social/stories/%@/?page=%d", theFeedDetailURL = [NSString stringWithFormat:@"%@/social/stories/%@/?page=%d",
NEWSBLUR_URL, NEWSBLUR_URL,
[appDelegate.activeFeed objectForKey:@"user_id"], [appDelegate.activeFeed objectForKey:@"user_id"],
self.feedPage]; self.feedPage];
} else { } else {
theFeedDetailURL = [NSString stringWithFormat:@"http://%@/reader/feed/%@/?page=%d", theFeedDetailURL = [NSString stringWithFormat:@"%@/reader/feed/%@/?page=%d",
NEWSBLUR_URL, NEWSBLUR_URL,
[appDelegate.activeFeed objectForKey:@"id"], [appDelegate.activeFeed objectForKey:@"id"],
self.feedPage]; self.feedPage];
@ -455,24 +455,24 @@
if (appDelegate.isSocialRiverView) { if (appDelegate.isSocialRiverView) {
if ([appDelegate.activeFolder isEqualToString:@"river_global"]) { if ([appDelegate.activeFolder isEqualToString:@"river_global"]) {
theFeedDetailURL = [NSString stringWithFormat: theFeedDetailURL = [NSString stringWithFormat:
@"http://%@/social/river_stories/?global_feed=true&page=%d", @"%@/social/river_stories/?global_feed=true&page=%d",
NEWSBLUR_URL, NEWSBLUR_URL,
self.feedPage]; self.feedPage];
} else { } else {
theFeedDetailURL = [NSString stringWithFormat: theFeedDetailURL = [NSString stringWithFormat:
@"http://%@/social/river_stories/?page=%d", @"%@/social/river_stories/?page=%d",
NEWSBLUR_URL, NEWSBLUR_URL,
self.feedPage]; self.feedPage];
} }
} else if ([appDelegate.activeFolder isEqual:@"saved_stories"]) { } else if ([appDelegate.activeFolder isEqual:@"saved_stories"]) {
theFeedDetailURL = [NSString stringWithFormat: theFeedDetailURL = [NSString stringWithFormat:
@"http://%@/reader/starred_stories/?page=%d", @"%@/reader/starred_stories/?page=%d",
NEWSBLUR_URL, NEWSBLUR_URL,
self.feedPage]; self.feedPage];
} else { } else {
theFeedDetailURL = [NSString stringWithFormat: theFeedDetailURL = [NSString stringWithFormat:
@"http://%@/reader/river_stories/?feeds=%@&page=%d", @"%@/reader/river_stories/?feeds=%@&page=%d",
NEWSBLUR_URL, NEWSBLUR_URL,
[appDelegate.activeFolderFeeds componentsJoinedByString:@"&feeds="], [appDelegate.activeFolderFeeds componentsJoinedByString:@"&feeds="],
self.feedPage]; self.feedPage];
@ -1022,7 +1022,7 @@
if (appDelegate.isRiverView && includeHidden && if (appDelegate.isRiverView && includeHidden &&
[appDelegate.activeFolder isEqualToString:@"everything"]) { [appDelegate.activeFolder isEqualToString:@"everything"]) {
// Mark folder as read // Mark folder as read
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_all_as_read", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_all_as_read",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -1032,7 +1032,7 @@
[appDelegate markActiveFolderAllRead]; [appDelegate markActiveFolderAllRead];
} else if (appDelegate.isRiverView && includeHidden) { } else if (appDelegate.isRiverView && includeHidden) {
// Mark folder as read // Mark folder as read
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_feed_as_read", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_feed_as_read",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -1045,7 +1045,7 @@
[appDelegate markActiveFolderAllRead]; [appDelegate markActiveFolderAllRead];
} else if (!appDelegate.isRiverView && includeHidden) { } else if (!appDelegate.isRiverView && includeHidden) {
// Mark feed as read // Mark feed as read
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_feed_as_read", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_feed_as_read",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -1058,7 +1058,7 @@
} else { } else {
// Mark visible stories as read // Mark visible stories as read
NSDictionary *feedsStories = [appDelegate markVisibleStoriesRead]; NSDictionary *feedsStories = [appDelegate markVisibleStoriesRead];
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_feed_stories_as_read", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_feed_stories_as_read",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -1257,7 +1257,7 @@
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
HUD.labelText = @"Deleting..."; HUD.labelText = @"Deleting...";
NSString *theFeedDetailURL = [NSString stringWithFormat:@"http://%@/reader/delete_feed", NSString *theFeedDetailURL = [NSString stringWithFormat:@"%@/reader/delete_feed",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *urlFeedDetail = [NSURL URLWithString:theFeedDetailURL]; NSURL *urlFeedDetail = [NSURL URLWithString:theFeedDetailURL];
@ -1284,7 +1284,7 @@
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
HUD.labelText = @"Deleting..."; HUD.labelText = @"Deleting...";
NSString *theFeedDetailURL = [NSString stringWithFormat:@"http://%@/reader/delete_folder", NSString *theFeedDetailURL = [NSString stringWithFormat:@"%@/reader/delete_folder",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *urlFeedDetail = [NSURL URLWithString:theFeedDetailURL]; NSURL *urlFeedDetail = [NSURL URLWithString:theFeedDetailURL];
@ -1352,7 +1352,7 @@
- (void)instafetchFeed { - (void)instafetchFeed {
NSString *urlString = [NSString NSString *urlString = [NSString
stringWithFormat:@"http://%@/reader/refresh_feed/%@", stringWithFormat:@"%@/reader/refresh_feed/%@",
NEWSBLUR_URL, NEWSBLUR_URL,
[appDelegate.activeFeed objectForKey:@"id"]]; [appDelegate.activeFeed objectForKey:@"id"]];
[self cancelRequests]; [self cancelRequests];
@ -1403,7 +1403,7 @@
NSString *feedIdsQuery = [NSString stringWithFormat:@"?feed_ids=%@", NSString *feedIdsQuery = [NSString stringWithFormat:@"?feed_ids=%@",
[[keys valueForKey:@"description"] componentsJoinedByString:@"&feed_ids="]]; [[keys valueForKey:@"description"] componentsJoinedByString:@"&feed_ids="]];
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/favicons%@", NSString *urlString = [NSString stringWithFormat:@"%@/reader/favicons%@",
NEWSBLUR_URL, NEWSBLUR_URL,
feedIdsQuery]; feedIdsQuery];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];

View file

@ -140,7 +140,7 @@
return; return;
} }
if (buttonIndex == 1) { if (buttonIndex == 1) {
NSString *urlS = [NSString stringWithFormat:@"http://%@/reader/login_as?user=%@", NSString *urlS = [NSString stringWithFormat:@"%@/reader/login_as?user=%@",
NEWSBLUR_URL, alertTextField.text]; NEWSBLUR_URL, alertTextField.text];
NSURL *url = [NSURL URLWithString:urlS]; NSURL *url = [NSURL URLWithString:urlS];

View file

@ -113,7 +113,7 @@
#pragma mark Check Social #pragma mark Check Social
- (void)connectToSocial { - (void)connectToSocial {
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/load_user_friends", NSString *urlString = [NSString stringWithFormat:@"%@/social/load_user_friends",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
@ -196,7 +196,7 @@
UISwitch *button = (UISwitch *)sender; UISwitch *button = (UISwitch *)sender;
NSURL *preferenceURL = [NSURL URLWithString: NSURL *preferenceURL = [NSURL URLWithString:
[NSString stringWithFormat:@"http://%@/profile/set_preference", [NSString stringWithFormat:@"%@/profile/set_preference",
NEWSBLUR_URL]]; NEWSBLUR_URL]];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:preferenceURL]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:preferenceURL];

View file

@ -105,7 +105,7 @@
#pragma mark Add Site #pragma mark Add Site
- (void)addPopular { - (void)addPopular {
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/follow/", NSString *urlString = [NSString stringWithFormat:@"%@/social/follow/",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -118,7 +118,7 @@
} }
- (void)addSite:(NSString *)siteUrl { - (void)addSite:(NSString *)siteUrl {
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/add_url/", NSString *urlString = [NSString stringWithFormat:@"%@/reader/add_url/",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];

View file

@ -118,7 +118,7 @@
[appDelegate.ftuxNavigationController pushViewController:appDelegate.firstTimeUserAddFriendsViewController animated:YES]; [appDelegate.ftuxNavigationController pushViewController:appDelegate.firstTimeUserAddFriendsViewController animated:YES];
if (self.selectedCategories_.count) { if (self.selectedCategories_.count) {
NSString *urlString = [NSString stringWithFormat:@"http://%@/categories/subscribe", NSString *urlString = [NSString stringWithFormat:@"%@/categories/subscribe",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -167,7 +167,7 @@
self.instructionLabel.text = @"This might take a minute.\nFeel free to continue..."; self.instructionLabel.text = @"This might take a minute.\nFeel free to continue...";
[self.googleReaderButton addSubview:self.activityIndicator]; [self.googleReaderButton addSubview:self.activityIndicator];
[self.activityIndicator startAnimating]; [self.activityIndicator startAnimating];
NSString *urlString = [NSString stringWithFormat:@"http://%@/import/import_from_google_reader/", NSString *urlString = [NSString stringWithFormat:@"%@/import/import_from_google_reader/",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -267,7 +267,7 @@
#pragma mark Add Site #pragma mark Add Site
- (void)addSite:(NSString *)siteUrl { - (void)addSite:(NSString *)siteUrl {
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/add_url", NSString *urlString = [NSString stringWithFormat:@"%@/reader/add_url",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];

View file

@ -110,7 +110,7 @@
} }
- (void)loadFriendsList:(NSString *)query { - (void)loadFriendsList:(NSString *)query {
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/find_friends?query=%@&limit=10", NSString *urlString = [NSString stringWithFormat:@"%@/social/find_friends?query=%@&limit=10",
NEWSBLUR_URL, NEWSBLUR_URL,
query]; query];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
@ -123,7 +123,7 @@
} }
- (void)loadSuggestedFriendsList { - (void)loadSuggestedFriendsList {
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/load_user_friends", NSString *urlString = [NSString stringWithFormat:@"%@/social/load_user_friends",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];

View file

@ -97,7 +97,7 @@
self.pageFetching = YES; self.pageFetching = YES;
NSString *urlString = [NSString stringWithFormat:@ NSString *urlString = [NSString stringWithFormat:@
"http://%@/social/interactions?user_id=%@&page=%i&limit=10" "%@/social/interactions?user_id=%@&page=%i&limit=10"
"&category=follow&category=comment_reply&category=comment_like&category=reply_reply&category=story_reshare", "&category=follow&category=comment_reply&category=comment_like&category=reply_reply&category=story_reshare",
NEWSBLUR_URL, NEWSBLUR_URL,
[appDelegate.dictSocialProfile objectForKey:@"user_id"], [appDelegate.dictSocialProfile objectForKey:@"user_id"],

View file

@ -180,7 +180,7 @@
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
HUD.labelText = @"Authenticating"; HUD.labelText = @"Authenticating";
NSString *urlString = [NSString stringWithFormat:@"http://%@/api/login", NSString *urlString = [NSString stringWithFormat:@"https://%@/api/login",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
[[NSHTTPCookieStorage sharedHTTPCookieStorage] [[NSHTTPCookieStorage sharedHTTPCookieStorage]
@ -230,7 +230,7 @@
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
HUD.labelText = @"Registering..."; HUD.labelText = @"Registering...";
[self.errorLabel setHidden:YES]; [self.errorLabel setHidden:YES];
NSString *urlString = [NSString stringWithFormat:@"http://%@/api/signup", NSString *urlString = [NSString stringWithFormat:@"%@/api/signup",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
[[NSHTTPCookieStorage sharedHTTPCookieStorage] [[NSHTTPCookieStorage sharedHTTPCookieStorage]

View file

@ -131,7 +131,7 @@
[self.movingLabel setText:@"Moving site..."]; [self.movingLabel setText:@"Moving site..."];
[self.errorLabel setHidden:YES]; [self.errorLabel setHidden:YES];
[self.activityIndicator startAnimating]; [self.activityIndicator startAnimating];
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/move_feed_to_folder", NSString *urlString = [NSString stringWithFormat:@"%@/reader/move_feed_to_folder",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -180,7 +180,7 @@
[self.movingLabel setText:@"Moving Folder..."]; [self.movingLabel setText:@"Moving Folder..."];
[self.errorLabel setHidden:YES]; [self.errorLabel setHidden:YES];
[self.activityIndicator startAnimating]; [self.activityIndicator startAnimating];
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/move_folder_to_folder", NSString *urlString = [NSString stringWithFormat:@"%@/reader/move_folder_to_folder",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];

View file

@ -270,7 +270,7 @@
} }
- (void)setupReachability { - (void)setupReachability {
Reachability* reach = [Reachability reachabilityWithHostname:NEWSBLUR_URL]; Reachability* reach = [Reachability reachabilityWithHostname:NEWSBLUR_HOST];
[[NSNotificationCenter defaultCenter] addObserver:self [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reachabilityChanged:) selector:@selector(reachabilityChanged:)
name:kReachabilityChangedNotification name:kReachabilityChangedNotification
@ -639,7 +639,7 @@
} }
- (void)refreshUserProfile:(void(^)())callback { - (void)refreshUserProfile:(void(^)())callback {
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/social/load_user_profile", NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/social/load_user_profile",
NEWSBLUR_URL]]; NEWSBLUR_URL]];
ASIHTTPRequest *_request = [ASIHTTPRequest requestWithURL:url]; ASIHTTPRequest *_request = [ASIHTTPRequest requestWithURL:url];
__weak ASIHTTPRequest *request = _request; __weak ASIHTTPRequest *request = _request;
@ -672,7 +672,7 @@
return; return;
} else { } else {
NSLog(@"Logging out..."); NSLog(@"Logging out...");
NSString *urlS = [NSString stringWithFormat:@"http://%@/reader/logout?api=1", NSString *urlS = [NSString stringWithFormat:@"%@/reader/logout?api=1",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlS]; NSURL *url = [NSURL URLWithString:urlS];
@ -1851,7 +1851,7 @@
[self.storyPageControl refreshHeaders]; [self.storyPageControl refreshHeaders];
[self.trainerViewController refresh]; [self.trainerViewController refresh];
NSString *urlString = [NSString stringWithFormat:@"http://%@/classifier/save", NSString *urlString = [NSString stringWithFormat:@"%@/classifier/save",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
__block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; __block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -1894,7 +1894,7 @@
[self.storyPageControl refreshHeaders]; [self.storyPageControl refreshHeaders];
[self.trainerViewController refresh]; [self.trainerViewController refresh];
NSString *urlString = [NSString stringWithFormat:@"http://%@/classifier/save", NSString *urlString = [NSString stringWithFormat:@"%@/classifier/save",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
__block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; __block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -1941,7 +1941,7 @@
[self.storyPageControl refreshHeaders]; [self.storyPageControl refreshHeaders];
[self.trainerViewController refresh]; [self.trainerViewController refresh];
NSString *urlString = [NSString stringWithFormat:@"http://%@/classifier/save", NSString *urlString = [NSString stringWithFormat:@"%@/classifier/save",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
__block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; __block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -1983,7 +1983,7 @@
[self.storyPageControl refreshHeaders]; [self.storyPageControl refreshHeaders];
[self.trainerViewController refresh]; [self.trainerViewController refresh];
NSString *urlString = [NSString stringWithFormat:@"http://%@/classifier/save", NSString *urlString = [NSString stringWithFormat:@"%@/classifier/save",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
__block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; __block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -2024,7 +2024,7 @@
- (void)createDatabaseConnection { - (void)createDatabaseConnection {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *docsPath = [paths objectAtIndex:0]; NSString *docsPath = [paths objectAtIndex:0];
NSString *dbName = [NSString stringWithFormat:@"%@.sqlite", NEWSBLUR_URL]; NSString *dbName = [NSString stringWithFormat:@"%@.sqlite", NEWSBLUR_HOST];
NSString *path = [docsPath stringByAppendingPathComponent:dbName]; NSString *path = [docsPath stringByAppendingPathComponent:dbName];
database = [FMDatabaseQueue databaseQueueWithPath:path]; database = [FMDatabaseQueue databaseQueueWithPath:path];
@ -2080,7 +2080,7 @@
- (void)fetchUnreadHashes { - (void)fetchUnreadHashes {
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/reader/unread_story_hashes?include_timestamps=true", NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/reader/unread_story_hashes?include_timestamps=true",
NEWSBLUR_URL]]; NEWSBLUR_URL]];
ASIHTTPRequest *_request = [ASIHTTPRequest requestWithURL:url]; ASIHTTPRequest *_request = [ASIHTTPRequest requestWithURL:url];
__weak ASIHTTPRequest *request = _request; __weak ASIHTTPRequest *request = _request;
@ -2185,7 +2185,7 @@
return; return;
} }
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/reader/river_stories?page=0&h=%@", NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/reader/river_stories?page=0&h=%@",
NEWSBLUR_URL, [hashes componentsJoinedByString:@"&h="]]]; NEWSBLUR_URL, [hashes componentsJoinedByString:@"&h="]]];
ASIHTTPRequest *_request = [ASIHTTPRequest requestWithURL:url]; ASIHTTPRequest *_request = [ASIHTTPRequest requestWithURL:url];
__weak ASIHTTPRequest *request = _request; __weak ASIHTTPRequest *request = _request;
@ -2268,7 +2268,7 @@
} }
- (void)syncQueuedReadStories:(FMDatabase *)db withStories:(NSDictionary *)hashes withCallback:(void(^)())callback { - (void)syncQueuedReadStories:(FMDatabase *)db withStories:(NSDictionary *)hashes withCallback:(void(^)())callback {
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_feed_stories_as_read", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_feed_stories_as_read",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
NSMutableArray *completedHashes = [NSMutableArray array]; NSMutableArray *completedHashes = [NSMutableArray array];

View file

@ -419,11 +419,11 @@ static const CGFloat kFolderTitleHeight = 28;
if (self.inPullToRefresh_) { if (self.inPullToRefresh_) {
urlFeedList = [NSURL URLWithString: urlFeedList = [NSURL URLWithString:
[NSString stringWithFormat:@"http://%@/reader/feeds?flat=true&update_counts=true", [NSString stringWithFormat:@"%@/reader/feeds?flat=true&update_counts=true",
NEWSBLUR_URL]]; NEWSBLUR_URL]];
} else { } else {
urlFeedList = [NSURL URLWithString: urlFeedList = [NSURL URLWithString:
[NSString stringWithFormat:@"http://%@/reader/feeds?flat=true&update_counts=false", [NSString stringWithFormat:@"%@/reader/feeds?flat=true&update_counts=false",
NEWSBLUR_URL]]; NEWSBLUR_URL]];
} }
@ -1303,7 +1303,7 @@ heightForHeaderInSection:(NSInteger)section {
- (void)loadFavicons { - (void)loadFavicons {
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/favicons", NSString *urlString = [NSString stringWithFormat:@"%@/reader/favicons",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
@ -1392,10 +1392,10 @@ heightForHeaderInSection:(NSInteger)section {
// refresh the feed // refresh the feed
NSString *urlString; NSString *urlString;
if (feedId) { if (feedId) {
urlString = [NSString stringWithFormat:@"http://%@/reader/feed_unread_count?feed_id=%@", urlString = [NSString stringWithFormat:@"%@/reader/feed_unread_count?feed_id=%@",
NEWSBLUR_URL, feedId]; NEWSBLUR_URL, feedId];
} else { } else {
urlString = [NSString stringWithFormat:@"http://%@/reader/refresh_feeds", urlString = [NSString stringWithFormat:@"%@/reader/refresh_feeds",
NEWSBLUR_URL]; NEWSBLUR_URL];
} }
NSURL *urlFeedList = [NSURL URLWithString:urlString]; NSURL *urlFeedList = [NSURL URLWithString:urlString];

View file

@ -203,7 +203,7 @@
NSURL* url = [NSURL URLWithString:urlString]; NSURL* url = [NSURL URLWithString:urlString];
if (!url.scheme) { if (!url.scheme) {
NSString* modifiedURLString = [NSString stringWithFormat:@"http://%@", urlString]; NSString* modifiedURLString = [NSString stringWithFormat:@"%@", urlString];
url = [NSURL URLWithString:modifiedURLString]; url = [NSURL URLWithString:modifiedURLString];
} }
if ([self.webView isLoading]) { if ([self.webView isLoading]) {

View file

@ -306,10 +306,10 @@
[self.activityIndicator startAnimating]; [self.activityIndicator startAnimating];
if ([self.followButton.currentTitle isEqualToString:@"Follow"]) { if ([self.followButton.currentTitle isEqualToString:@"Follow"]) {
urlString = [NSString stringWithFormat:@"http://%@/social/follow", urlString = [NSString stringWithFormat:@"%@/social/follow",
NEWSBLUR_URL]; NEWSBLUR_URL];
} else { } else {
urlString = [NSString stringWithFormat:@"http://%@/social/unfollow", urlString = [NSString stringWithFormat:@"%@/social/unfollow",
NEWSBLUR_URL]; NEWSBLUR_URL];
} }

View file

@ -304,7 +304,7 @@
- (IBAction)doShareThisStory:(id)sender { - (IBAction)doShareThisStory:(id)sender {
[appDelegate.storyPageControl showShareHUD:@"Sharing"]; [appDelegate.storyPageControl showShareHUD:@"Sharing"];
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/share_story", NSString *urlString = [NSString stringWithFormat:@"%@/social/share_story",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
@ -378,7 +378,7 @@
} }
// NSLog(@"REPLY TO COMMENT, %@", appDelegate.activeComment); // NSLog(@"REPLY TO COMMENT, %@", appDelegate.activeComment);
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/save_comment_reply", NSString *urlString = [NSString stringWithFormat:@"%@/social/save_comment_reply",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"story_feed_id"]]; NSString *feedIdStr = [NSString stringWithFormat:@"%@", [appDelegate.activeStory objectForKey:@"story_feed_id"]];

View file

@ -1123,10 +1123,10 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
[appDelegate.storyPageControl showShareHUD:@"Favoriting"]; [appDelegate.storyPageControl showShareHUD:@"Favoriting"];
NSString *urlString; NSString *urlString;
if (likeComment) { if (likeComment) {
urlString = [NSString stringWithFormat:@"http://%@/social/like_comment", urlString = [NSString stringWithFormat:@"%@/social/like_comment",
NEWSBLUR_URL]; NEWSBLUR_URL];
} else { } else {
urlString = [NSString stringWithFormat:@"http://%@/social/remove_like_comment", urlString = [NSString stringWithFormat:@"%@/social/remove_like_comment",
NEWSBLUR_URL]; NEWSBLUR_URL];
} }
@ -1248,7 +1248,7 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
- (void)subscribeToBlurblog { - (void)subscribeToBlurblog {
[appDelegate.storyPageControl showShareHUD:@"Following"]; [appDelegate.storyPageControl showShareHUD:@"Following"];
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/follow", NSString *urlString = [NSString stringWithFormat:@"%@/social/follow",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
@ -1409,7 +1409,7 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.webView animated:YES]; MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.webView animated:YES];
HUD.labelText = @"Fetching text..."; HUD.labelText = @"Fetching text...";
NSString *urlString = [NSString stringWithFormat:@"http://%@/rss_feeds/original_text", NSString *urlString = [NSString stringWithFormat:@"%@/rss_feeds/original_text",
NEWSBLUR_URL]; NEWSBLUR_URL];
ASIFormDataRequest *request = [self formRequestWithURL:urlString]; ASIFormDataRequest *request = [self formRequestWithURL:urlString];
[request addPostValue:[appDelegate.activeStory objectForKey:@"id"] forKey:@"story_id"]; [request addPostValue:[appDelegate.activeStory objectForKey:@"id"] forKey:@"story_id"];

View file

@ -722,10 +722,10 @@
NSString *urlString; NSString *urlString;
if (appDelegate.isSocialView || appDelegate.isSocialRiverView) { if (appDelegate.isSocialView || appDelegate.isSocialRiverView) {
urlString = [NSString stringWithFormat:@"http://%@/reader/mark_social_stories_as_read", urlString = [NSString stringWithFormat:@"%@/reader/mark_social_stories_as_read",
NEWSBLUR_URL]; NEWSBLUR_URL];
} else { } else {
urlString = [NSString stringWithFormat:@"http://%@/reader/mark_story_as_read", urlString = [NSString stringWithFormat:@"%@/reader/mark_story_as_read",
NEWSBLUR_URL]; NEWSBLUR_URL];
} }
@ -812,7 +812,7 @@
} }
- (void)markStoryAsSaved { - (void)markStoryAsSaved {
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_story_as_starred", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_story_as_starred",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -842,7 +842,7 @@
- (void)markStoryAsUnsaved { - (void)markStoryAsUnsaved {
// [appDelegate markActiveStoryUnread]; // [appDelegate markActiveStoryUnread];
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_story_as_unstarred", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_story_as_unstarred",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
@ -874,7 +874,7 @@
- (void)markStoryAsUnread { - (void)markStoryAsUnread {
if ([[appDelegate.activeStory objectForKey:@"read_status"] intValue] == 1) { if ([[appDelegate.activeStory objectForKey:@"read_status"] intValue] == 1) {
NSString *urlString = [NSString stringWithFormat:@"http://%@/reader/mark_story_as_unread", NSString *urlString = [NSString stringWithFormat:@"%@/reader/mark_story_as_unread",
NEWSBLUR_URL]; NEWSBLUR_URL];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];

View file

@ -98,7 +98,7 @@
HUD.labelText = @"Profiling..."; HUD.labelText = @"Profiling...";
[self.profileBadge initProfile]; [self.profileBadge initProfile];
NSString *urlString = [NSString stringWithFormat:@ NSString *urlString = [NSString stringWithFormat:@
"http://%@/social/profile?user_id=%@" "%@/social/profile?user_id=%@"
"&category=follow&category=comment_reply&category=comment_like&category=sharedstory", "&category=follow&category=comment_reply&category=comment_like&category=sharedstory",
NEWSBLUR_URL, NEWSBLUR_URL,
appDelegate.activeUserProfileId]; appDelegate.activeUserProfileId];

View file

@ -14,7 +14,8 @@
#define BACKGROUND_REFRESH_SECONDS -10*60 #define BACKGROUND_REFRESH_SECONDS -10*60
// #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.com"] // #define NEWSBLUR_URL [NSString stringWithFormat:@"nb.local.com"]
#define NEWSBLUR_URL [NSString stringWithFormat:@"www.newsblur.com"] #define NEWSBLUR_URL [NSString stringWithFormat:@"https://www.newsblur.com"]
#define NEWSBLUR_HOST [NSString stringWithFormat:@"www.newsblur.com"]
#define NEWSBLUR_LINK_COLOR 0x405BA8 #define NEWSBLUR_LINK_COLOR 0x405BA8
#define NEWSBLUR_HIGHLIGHT_COLOR 0xd2e6fd #define NEWSBLUR_HIGHLIGHT_COLOR 0xd2e6fd

View file

@ -10,6 +10,7 @@ NEWSBLUR.Views.StoryListView = Backbone.View.extend({
this.collection.bind('add', this.reset_story_positions, this); this.collection.bind('add', this.reset_story_positions, this);
this.collection.bind('no_more_stories', this.show_no_more_stories, this); this.collection.bind('no_more_stories', this.show_no_more_stories, this);
this.collection.bind('change:selected', this.show_only_selected_story, this); this.collection.bind('change:selected', this.show_only_selected_story, this);
this.collection.bind('change:selected', this.check_feed_view_scrolled_to_bottom, this);
this.$el.bind('mousemove', _.bind(this.handle_mousemove_feed_view, this)); this.$el.bind('mousemove', _.bind(this.handle_mousemove_feed_view, this));
this.$el.scroll(_.bind(this.handle_scroll_feed_view, this)); this.$el.scroll(_.bind(this.handle_scroll_feed_view, this));
this.reset_flags(); this.reset_flags();
@ -308,6 +309,11 @@ NEWSBLUR.Views.StoryListView = Backbone.View.extend({
check_feed_view_scrolled_to_bottom: function() { check_feed_view_scrolled_to_bottom: function() {
if (!NEWSBLUR.assets.flags['no_more_stories']) { if (!NEWSBLUR.assets.flags['no_more_stories']) {
var last_story = NEWSBLUR.assets.stories.last(); var last_story = NEWSBLUR.assets.stories.last();
if (last_story.get('selected')) {
NEWSBLUR.reader.load_page_of_feed_stories();
return;
}
var $last_story = last_story.story_view.$el; var $last_story = last_story.story_view.$el;
var container_offset = this.$el.position().top; var container_offset = this.$el.position().top;
var full_height = ($last_story.length && $last_story.offset().top) + $last_story.height() - container_offset; var full_height = ($last_story.length && $last_story.offset().top) + $last_story.height() - container_offset;