From e6680a23b9c4447a6a907ab361a7dd17da3f18aa Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 21 May 2019 09:03:28 -0500 Subject: [PATCH] Make move animation smoother by wrapping in a BatchUpdate --- Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift index 7c74a7188..08f4f833b 100644 --- a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift +++ b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift @@ -244,16 +244,19 @@ private extension SidebarOutlineDataSource { } let source = node.parent?.representedObject as? Container let destination = parentNode.representedObject as? Container + BatchUpdate.shared.start() source?.removeFeed(feed) { result in switch result { case .success: destination?.addFeed(feed) { result in switch result { case .success: + BatchUpdate.shared.end() break case .failure(let error): // If the second part of the move failed, try to put the feed back source?.addFeed(feed) { result in} + BatchUpdate.shared.end() NSApplication.shared.presentError(error) } }