Merge branch 'bugfix/CXTDT-579050' into 'release/20_0_3'
Digital PCT265 defect CXTDT-579050: Prevent updateViews from triggering... ### Summary UAD thread state crash fix. ### JIRA Ticket https://onejira.verizon.com/browse/CXTDT-579050 See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1140
This commit is contained in:
commit
12bbe5d9a2
@ -52,8 +52,8 @@ open class ThreeLayerTableViewController: ProgrammaticTableViewController, Rotor
|
||||
bottomView.updateView(width)
|
||||
showFooter(width)
|
||||
}
|
||||
tableView.visibleCells.forEach { cell in
|
||||
(cell as? MVMCoreViewProtocol)?.updateView(width)
|
||||
MVMCoreUIUtility.findParentViews(by: (UITableViewCell & MVMCoreViewProtocol).self, views: tableView.subviews).forEach { view in
|
||||
view.updateView(width)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -60,6 +60,16 @@ public extension MVMCoreUIUtility {
|
||||
return findViews(by: type, views: queue, excludedViews: excludedViews) + matching
|
||||
}
|
||||
|
||||
static func findParentViews<T>(by type: T.Type, views: [UIView]) -> [T] {
|
||||
return views.reduce(into: [T]()) { matchingViews, view in
|
||||
if let view = view as? T {
|
||||
return matchingViews.append(view) // If this view is the type stop here and return, ignoring its children.
|
||||
}
|
||||
// Otherwise check downstream.
|
||||
matchingViews += findParentViews(by: type, views: view.subviews)
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
static func visibleNavigationBarStlye() -> NavigationItemStyle? {
|
||||
if let navController = NavigationController.navigationController(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user