core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/feed/FeedManager.java
branchRCL_2_0
changeset 99 3604ec4c983e
parent 83 6c6d4b0c9171
child 104 4ca9a303c257
--- a/core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/feed/FeedManager.java	Tue Apr 14 13:14:38 2009 -0500
+++ b/core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/feed/FeedManager.java	Thu Apr 16 14:39:51 2009 -0500
@@ -44,7 +44,6 @@
 import com.sun.syndication.fetcher.FeedFetcher;
 import com.sun.syndication.fetcher.impl.FeedFetcherCache;
 import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
-import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
 
 /**
  * A class to manage feeds for the Carbide.c++ news reader.
@@ -191,11 +190,11 @@
 	}
 
 	/**
-	 * Remove an entry from a feed.
-	 * @param feed - feed object in question
-	 * @param entryTitle - title of the entry to be removed
+	 * Search for a feed entry by name and then mark it as read.
+	 * @param entries - feed entries to be checked
+	 * @param entryTitle - title of the entry to be marked as read
 	 */
-	public void removeNewsFeedEntry(List<CarbideSyndEntry> entries, String entryTitle) {
+	public void markEntryAsRead(List<CarbideSyndEntry> entries, String entryTitle) {
 		if (entries == null || entryTitle == null) {
 			return;
 		}
@@ -204,7 +203,7 @@
 			CarbideSyndEntry entry = iterator.next();
 			String title = entry.getTitle();
 			title = title.replaceAll("\n", "");
-			if (title.equals(entryTitle)) {
+			if (title.equals(entryTitle) && !entry.isRead()) {
 				entry.setRead(true);
 				break;
 			}