Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: (#974) (보관함 > λ‚΄ 리슀트) μ• λ‹ˆλ©”μ΄μ…˜ μ΄ˆκΈ°ν™” κ³Όμ • μ•ˆλ³΄μ΄κ²Œ μˆ˜μ • #1282

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class ListStorageViewController: BaseReactorViewController<ListStorageReac
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
LogManager.analytics(CommonAnalyticsLog.viewPage(pageName: .storagePlaylist))
listStorageView.resetParticeAnimation()
listStorageView.startParticeAnimation()

// ν”Œλ¦¬ μƒμ„Έμ—μ„œ λ‚΄ 리슀트둜 λŒμ•„μ˜€λŠ” 경우, ν”Œλ‘œνŒ… λ²„νŠΌ 올림
NotificationCenter.default.post(
Expand All @@ -75,6 +75,11 @@ final class ListStorageViewController: BaseReactorViewController<ListStorageReac
)
}

override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
listStorageView.removeParticeAnimation()
}

override func configureUI() {
reactor?.action.onNext(.viewDidLoad)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ private protocol ListStorageStateProtocol {
func updateIsEnabledRefreshControl(isEnabled: Bool)
func updateIsHiddenLoginWarningView(isHidden: Bool)
func updateIsHiddenEmptyWarningView(isHidden: Bool)
func resetParticeAnimation()
func startParticeAnimation()
func removeParticeAnimation()
}

private protocol ListStorageActionProtocol {
Expand Down Expand Up @@ -140,8 +141,12 @@ private extension ListStorageView {
}

extension ListStorageView: ListStorageStateProtocol {
func resetParticeAnimation() {
particleAnimationView.resetAnimation()
func startParticeAnimation() {
particleAnimationView.startAnimation()
}

func removeParticeAnimation() {
particleAnimationView.removeAnimation()
}

func updateIsHiddenEmptyWarningView(isHidden: Bool) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ private extension ParticleAnimationView {
}

extension ParticleAnimationView: ParticleAnimationStateProtocol {
@objc func resetAnimation() {
removeAnimation()
startAnimation()
}

@objc func removeAnimation() {
self.subviews.forEach { $0.removeAllAnimations() }
}
Expand Down
Loading