Update unread counts after fetching articles on changing selection in the sidebar.

This commit is contained in:
Brent Simmons 2017-10-19 21:56:30 -07:00
parent 5289a68433
commit 4c017dab10
2 changed files with 11 additions and 10 deletions

View File

@ -176,12 +176,14 @@ private extension SidebarViewController {
func postSidebarSelectionDidChangeNotification(_ selectedObjects: [AnyObject]?) {
let appInfo = AppInfo()
if let selectedObjects = selectedObjects {
appInfo.objects = selectedObjects
updateUnreadCounts(for: selectedObjects)
if let objects = selectedObjects {
appInfo.objects = objects
DispatchQueue.main.async {
self.updateUnreadCounts(for: objects)
}
}
appInfo.view = outlineView
NotificationCenter.default.post(name: .SidebarSelectionDidChange, object: self, userInfo: appInfo.userInfo)
}

View File

@ -6,16 +6,15 @@
</editor> -->
<title>ToDo</title>
<dateCreated>Tue, 12 Sep 2017 20:15:17 GMT</dateCreated>
<expansionState>0,13,21,24,25,28,32,38,46,47,49,64,69</expansionState>
<expansionState>0,12,20,23,24,27,31,37,45,46,48,63,68</expansionState>
<vertScrollState>0</vertScrollState>
<windowTop>632</windowTop>
<windowLeft>48</windowLeft>
<windowRight>780</windowRight>
<windowBottom>1391</windowBottom>
<windowTop>602</windowTop>
<windowLeft>62</windowLeft>
<windowRight>794</windowRight>
<windowBottom>1361</windowBottom>
</head>
<body>
<outline text="App">
<outline text="Bug: sidebar tree controller duplicates items after adding a folder"/>
<outline text="On change sidebar selection, load articles before updating unread count"/>
<outline text="Update Sparkle"/>
<outline text="Use new app icon"/>