Fix the iPad which seems to like to set the selected value to nil after setting it to the correct selection
This commit is contained in:
parent
9240c8e8a9
commit
8291230561
|
@ -91,11 +91,11 @@ private extension SidebarModel {
|
|||
}
|
||||
.assign(to: $selectedFeeds)
|
||||
|
||||
$selectedFeedIdentifier.map { [weak self] feedID in
|
||||
$selectedFeedIdentifier.compactMap { [weak self] feedID in
|
||||
if let feedID = feedID, let feed = self?.findFeed(feedID) {
|
||||
return [feed]
|
||||
} else {
|
||||
return [Feed]()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
.assign(to: $selectedFeeds)
|
||||
|
|
|
@ -131,11 +131,11 @@ class TimelineModel: ObservableObject, UndoableCommandRunner {
|
|||
}
|
||||
.assign(to: $selectedArticles)
|
||||
|
||||
$selectedArticleID.map { [weak self] articleID in
|
||||
$selectedArticleID.compactMap { [weak self] articleID in
|
||||
if let articleID = articleID, let article = self?.idToArticleDictionary[articleID] {
|
||||
return [article]
|
||||
} else {
|
||||
return [Article]()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
.assign(to: $selectedArticles)
|
||||
|
|
Loading…
Reference in New Issue