Fix Feed deselection. Issue #1657

This commit is contained in:
Maurice Parker 2020-01-19 18:36:23 -07:00
parent f15ade5ebb
commit 84844e6cef
1 changed files with 10 additions and 1 deletions

View File

@ -528,7 +528,16 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animated: animated)
}
} else {
tableView.selectRow(at: nil, animated: animated, scrollPosition: .none)
if animated {
// This nasty bit of duct tape is because there is something, somewhere
// interrupting the deselection animation, which will leave the row selected.
// This seems to get it far enough away the problem that it always works.
DispatchQueue.main.async {
self.tableView.selectRow(at: nil, animated: animated, scrollPosition: .none)
}
} else {
self.tableView.selectRow(at: nil, animated: animated, scrollPosition: .none)
}
}
}
}