Skip to content

Commit

Permalink
MOBILITY-2640 | layout view to avoid weird animation for collectionView
Browse files Browse the repository at this point in the history
  • Loading branch information
poomwtd authored and Poom Wutthidech committed Sep 3, 2024
1 parent 30c92f0 commit 8b74d19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ private extension UIView {
subview.recursiveShowSkeleton(skeletonConfig: config)
}

layoutSkeletonIfNeeded()

if let root = root {
_flowDelegate?.didShowSkeletons(rootView: root)
}
Expand All @@ -127,6 +129,8 @@ private extension UIView {
subview.recursiveUpdateSkeleton(skeletonConfig: config)
}

layoutSkeletonIfNeeded()

if let root = root {
_flowDelegate?.didUpdateSkeletons(rootView: root)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import UIKit
extension UIView {

func startTransition(transitionBlock: @escaping () -> Void) {
layoutIfNeeded()

guard let transitionStyle = _currentSkeletonConfig?.transition,
transitionStyle != .none else {
transitionBlock()
Expand Down

0 comments on commit 8b74d19

Please sign in to comment.