 
 	func sortDirectionDidChange() {
 
-		let selectedArticleIDs = selectedArticles.articleIDs()
-
-		let unsortedArticles = Set(articles)
-		updateArticles(with: unsortedArticles)
-
-		selectArticles(selectedArticleIDs)
+		performBlockAndRestoreSelection {
+			let unsortedArticles = Set(articles)
+			updateArticles(with: unsortedArticles)
+		}
+	}
+
+	func selectedArticleIDs() -> [String] {
+
+		return selectedArticles.articleIDs()
+	}
+
+	func restoreSelection(_ articleIDs: [String]) {
+
+		selectArticles(articleIDs)
 		if tableView.selectedRow != -1 {
 			tableView.scrollRowToVisible(tableView.selectedRow)
 		}
 	}
 
+	func performBlockAndRestoreSelection(_ block: (() -> Void)) {
+
+		let savedSelection = selectedArticleIDs()
+		block()
+		restoreSelection(savedSelection)
+	}
+	
 	// MARK: Fetching Articles
 
 	func fetchArticles() {


		rowHeightWithFeedName = calculateRowHeight(showingFeedNames: true)
		rowHeightWithoutFeedName = calculateRowHeight(showingFeedNames: false)
	}
}


			return
		}

		performBlockAndRestoreSelection {
			var unsortedArticles = fetchUnsortedArticles(for: representedObjects)
			unsortedArticles.formUnion(Set(articles))
			updateArticles(with: unsortedArticles)
		}
	}
	
	func selectArticles(_ articleIDs: [String]) {

		let indexesToSelect = articles.indexesForArticleIDs(Set(articleIDs))
