Skip to content

Commit 31f5fd3

Browse files
author
Michael Beattie
committed
[#67874900] tracked currentURL
1 parent 4964008 commit 31f5fd3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

EasyReader/Application/Controllers/Home/CSHomeViewController.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
@interface CSHomeViewController (){
2020
CSFeedItemCollectionViewDataSource *feedCollectionViewDataSource;
2121
FeedItem *currentFeedItem;
22+
NSString *currentURL;
2223
}
2324

2425
/// The collection view which holds the individual feed items
@@ -183,12 +184,12 @@ - (void)scrollToCurrentFeedItem
183184
-(void)loadFeedItemWebView
184185
{
185186
// Check if this is a new url
186-
if(currentFeedItem != self.collectionView_feedItems.currentFeedItem){
187+
if(currentURL != self.collectionView_feedItems.currentFeedItem.url){
187188
// update the current url
188-
currentFeedItem = self.collectionView_feedItems.currentFeedItem;
189+
currentURL = self.collectionView_feedItems.currentFeedItem.url;
189190

190191
// load the url in the webView
191-
NSURL *url = [NSURL URLWithString:self.collectionView_feedItems.currentFeedItem.url];
192+
NSURL *url = [NSURL URLWithString:currentURL];
192193
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
193194
[self.feedItemWebView loadRequest:requestObj];
194195
}

0 commit comments

Comments
 (0)