Tableview and collection view optimizations
This commit is contained in:
parent
25b7af0a07
commit
df02a46c62
@ -177,6 +177,7 @@ open class Carousel: View {
|
|||||||
if let originalModel, carouselModel.isDeeplyVisuallyEquivalent(to: originalModel) {
|
if let originalModel, carouselModel.isDeeplyVisuallyEquivalent(to: originalModel) {
|
||||||
// Prevents a carousel reset while still updating the cell backing data through reconfigureItems.
|
// Prevents a carousel reset while still updating the cell backing data through reconfigureItems.
|
||||||
MVMCoreLoggingHandler.shared()?.handleDebugMessage("[\(Self.self)] Model is visually equivalent. Skipping rebuild...")
|
MVMCoreLoggingHandler.shared()?.handleDebugMessage("[\(Self.self)] Model is visually equivalent. Skipping rebuild...")
|
||||||
|
prepareMolecules(with: carouselModel)
|
||||||
FormValidator.setupValidation(for: carouselModel, delegate: delegateObject?.formHolderDelegate)
|
FormValidator.setupValidation(for: carouselModel, delegate: delegateObject?.formHolderDelegate)
|
||||||
updateModelIndex() // Ensure the new model indexing matches the old.
|
updateModelIndex() // Ensure the new model indexing matches the old.
|
||||||
pagingView?.currentIndex = pageIndex // Trigger a paging view render.
|
pagingView?.currentIndex = pageIndex // Trigger a paging view render.
|
||||||
|
|||||||
@ -56,13 +56,14 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController, Rotor
|
|||||||
}
|
}
|
||||||
|
|
||||||
open override func updateUI(for molecules: [MoleculeModelProtocol]? = nil) {
|
open override func updateUI(for molecules: [MoleculeModelProtocol]? = nil) {
|
||||||
|
let isFirstRender = self.isFirstRender
|
||||||
super.updateUI(for: molecules)
|
super.updateUI(for: molecules)
|
||||||
|
|
||||||
guard molecules == nil else { return }
|
guard molecules == nil else { return }
|
||||||
|
|
||||||
createViewForTableHeader()
|
createViewForTableHeader()
|
||||||
createViewForTableFooter()
|
createViewForTableFooter()
|
||||||
tableView?.reloadData()
|
// Reloading the table is handled in updateViews.
|
||||||
}
|
}
|
||||||
|
|
||||||
override open func viewDidLoad() {
|
override open func viewDidLoad() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user