mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Merge branch 'master' into saved
* master: Using story's original text is present for send to sharing.
This commit is contained in:
commit
7f05f11f2c
2 changed files with 10 additions and 1 deletions
|
@ -448,6 +448,10 @@
|
|||
NSDictionary *feed = [self getFeed:feedId];
|
||||
NSString *feedTitle = [feed objectForKey:@"feed_title"];
|
||||
|
||||
if ([activeStory objectForKey:@"original_text"]) {
|
||||
text = [activeStory objectForKey:@"original_text"];
|
||||
}
|
||||
|
||||
return [self showSendTo:vc
|
||||
sender:sender
|
||||
withUrl:url
|
||||
|
|
|
@ -1649,10 +1649,15 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
|||
return;
|
||||
}
|
||||
|
||||
NSString *originalText = [[[results objectForKey:@"original_text"]stringByReplacingOccurrencesOfString:@"\'" withString:@"\\'"]
|
||||
NSString *originalText = [[[results objectForKey:@"original_text"]
|
||||
stringByReplacingOccurrencesOfString:@"\'" withString:@"\\'"]
|
||||
stringByReplacingOccurrencesOfString:@"\n" withString:@" "];
|
||||
NSString *jsString = [NSString stringWithFormat:@"document.getElementById('NB-story').innerHTML = '%@'; loadImages();",
|
||||
originalText];
|
||||
NSMutableDictionary *newActiveStory = [appDelegate.activeStory mutableCopy];
|
||||
[newActiveStory setObject:[results objectForKey:@"original_text"] forKey:@"original_text"];
|
||||
appDelegate.activeStory = newActiveStory;
|
||||
|
||||
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
|
||||
|
||||
[MBProgressHUD hideHUDForView:self.webView animated:YES];
|
||||
|
|
Loading…
Add table
Reference in a new issue