Fixed a minor animation glitch

pull/672/head
Morgan Pretty 3 years ago
parent c33b555c3c
commit 5bf3c2d35d

@ -622,9 +622,12 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl
}
private func handleInteractionUpdates(_ updatedData: [ConversationViewModel.SectionModel], initialLoad: Bool = false) {
// Ensure the first load or a load when returning from a child screen runs without animations (if
// we don't do this the cells will animate in from a frame of CGRect.zero or have a buggy transition)
// Ensure the first load or a load when returning from a child screen runs without
// animations (if we don't do this the cells will animate in from a frame of
// CGRect.zero or have a buggy transition)
guard self.hasLoadedInitialInteractionData else {
// Need to dispatch async to prevent this from causing glitches in the push animation
DispatchQueue.main.async {
self.hasLoadedInitialInteractionData = true
self.viewModel.updateInteractionData(updatedData)
@ -632,6 +635,7 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl
self.tableView.reloadData()
self.performInitialScrollIfNeeded()
}
}
return
}

Loading…
Cancel
Save