Skip to content

Commit

Permalink
Merge branch 'develop' into feature/design_system_2
Browse files Browse the repository at this point in the history
  • Loading branch information
youn9k authored Nov 30, 2023
2 parents 42cf53e + b8d7a7b commit fa7d5af
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 31 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "AppIcon_1024x1024.png",
"filename" : "AppIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Utility
import DesignSystem
import SnapKit
import Then
import MarqueeLabel

final class MiniPlayerView: UIView {
private lazy var blurEffectView = UIVisualEffectView().then {
Expand All @@ -37,7 +38,7 @@ final class MiniPlayerView: UIView {
$0.axis = .vertical
$0.distribution = .fill
}

lazy var titleLabel = WMFlowLabel(text: "제목", textColor: DesignSystemAsset.GrayColor.gray900.color, font: .t6(weight: .medium), alignment: .left, lineHeight: UIFont.WMFontSystem.t6().lineHeight, kernValue: -0.5, leadingBuffer: 0, trailingBuffer: 35, animationDelay: 1, animationSpeed: 30, fadeLength: 3)

lazy var artistLabel = WMFlowLabel(text: "아티스트", textColor: DesignSystemAsset.GrayColor.gray900.color, font: .t7(weight: .light), alignment: .left, lineHeight: UIFont.WMFontSystem.t6().lineHeight, kernValue: -0.5, leadingBuffer: 0, trailingBuffer: 20, animationDelay: 1, animationSpeed: 30, fadeLength: 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@ extension IntroViewController {
private func inputBind() {
input.fetchPermissionCheck.onNext(())
}
}

extension IntroViewController {
private func outputBind() {
permissionResult()
appInfoResult()
userInfoAndLottieEnded()
}

private func permissionResult() {
output.permissionResult
.do(onNext: { [weak self] (permission) in
guard let self = self else { return }
Expand All @@ -55,24 +63,23 @@ extension IntroViewController {
self.present(permission, animated: true)
})
.filter { return ($0 ?? false) == true }
.do(onNext: { [weak self] (_) in
guard let self = self else { return }
self.lottiePlay()
self.input.startLottieAnimation.onNext(())
})
.map{ _ in () }
.bind(to: input.fetchAppCheck)
.disposed(by: disposeBag)

}

private func appInfoResult(){
output.appInfoResult
.withUnretained(self)
.subscribe(onNext: { owner, result in
switch result {
case let .success(entity):
owner.lottiePlay(specialLogo: entity.specialLogo)

var textPopupVc: TextPopupViewController
let updateTitle: String = "왁타버스 뮤직이 업데이트 되었습니다."
let updateMessage: String = "최신 버전으로 업데이트 후 이용하시기 바랍니다.\n감사합니다."

switch entity.flag {
case .normal:
owner.input.fetchUserInfoCheck.onNext(())
Expand Down Expand Up @@ -131,6 +138,7 @@ extension IntroViewController {
owner.showPanModal(content: textPopupVc)

case let .failure(error):
owner.lottiePlay(specialLogo: false)
owner.showPanModal(
content: TextPopupViewController.viewController(
text: error.asWMError.errorDescription ?? "",
Expand All @@ -141,17 +149,20 @@ extension IntroViewController {
}
})
.disposed(by: disposeBag)

}

private func userInfoAndLottieEnded() {
Observable.zip(
output.userInfoResult,
output.endLottieAnimation
output.endedLottieAnimation
) { (result, _) -> Result<String, Error> in
return result
}
.withUnretained(self)
.subscribe(onNext: { (owner, result) in
switch result{
case .success(_):
case let .success(suc):
DEBUG_LOG("success: \(suc)✅✅")
owner.showTabBar()

case .failure(let error):
Expand All @@ -177,13 +188,17 @@ extension IntroViewController {
self.navigationController?.pushViewController(viewController, animated: false)
}

private func lottiePlay() {
let animationView = LottieAnimationView(name: "Splash_Logo_Main", bundle: DesignSystemResources.bundle)
private func lottiePlay(specialLogo: Bool) {
let animationView = LottieAnimationView(
name: specialLogo ? "Splash_Logo_Special" : "Splash_Logo_Main",
bundle: DesignSystemResources.bundle
)
animationView.frame = self.logoContentView.bounds
animationView.backgroundColor = .clear
animationView.contentMode = .scaleAspectFill
animationView.loopMode = .playOnce

animationView.clipsToBounds = false

self.logoContentView.addSubview(animationView)

let originWidth: CGFloat = 156.0
Expand All @@ -199,6 +214,9 @@ extension IntroViewController {
$0.centerX.equalTo(self.logoContentView.snp.centerX)
$0.centerY.equalTo(self.logoContentView.snp.centerY)
}
animationView.play()

animationView.play { _ in
self.input.endedLottieAnimation.onNext(())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ final public class IntroViewModel: ViewModelType {
var fetchPermissionCheck: PublishSubject<Void> = PublishSubject()
var fetchAppCheck: PublishSubject<Void> = PublishSubject()
var fetchUserInfoCheck: PublishSubject<Void> = PublishSubject()
var startLottieAnimation: PublishSubject<Void> = PublishSubject()
var endedLottieAnimation: PublishSubject<Void> = PublishSubject()
}

public struct Output {
var permissionResult: PublishSubject<Bool?> = PublishSubject()
var appInfoResult: PublishSubject<Result<AppInfoEntity, Error>> = PublishSubject()
var userInfoResult: PublishSubject<Result<String, Error>> = PublishSubject()
var endLottieAnimation: PublishSubject<Void> = PublishSubject()
var endedLottieAnimation: PublishSubject<Void> = PublishSubject()
}

public init(
Expand All @@ -57,9 +57,8 @@ final public class IntroViewModel: ViewModelType {
.bind(to: output.permissionResult)
.disposed(by: disposeBag)

input.startLottieAnimation
.delay(RxTimeInterval.milliseconds(1200), scheduler: MainScheduler.instance)
.bind(to: output.endLottieAnimation)
input.endedLottieAnimation
.bind(to: output.endedLottieAnimation)
.disposed(by: disposeBag)

input.fetchAppCheck
Expand All @@ -71,10 +70,12 @@ final public class IntroViewModel: ViewModelType {
if wmError == .offline {
return Single<AppInfoEntity>.create { single in
single(.success(AppInfoEntity(
flag: .offline,
title: "",
description: wmError.errorDescription ?? "",
version: ""))
flag: .offline,
title: "",
description: wmError.errorDescription ?? "",
version: "",
specialLogo: false)
)
)
return Disposables.create()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ import Foundation
public struct AppInfoDTO: Codable {
public let flag: AppInfoFlagType
public let title, description, version: String?
public let specialLogo: Bool?
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ public struct AppInfoEntity: Equatable {
flag: AppInfoFlagType,
title: String,
description: String,
version: String
version: String,
specialLogo: Bool
)
{
self.flag = flag
self.title = title
self.description = description
self.version = version
self.specialLogo = specialLogo
}

public let flag: AppInfoFlagType
public let title, description, version: String
public let specialLogo: Bool
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public extension AppInfoDTO {
flag: flag,
title: title ?? "",
description: description ?? "",
version: version ?? ""
version: version ?? "",
specialLogo: specialLogo ?? false
)
}
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Tuist/Signing/WaktaverseMusic.Debug.cer.encrypted
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Rd0yIgfF2SEOK+dXqkwmGA==-+TSQ+Zcs4QYGR9uc/42s/DGbqiwp18+SLXqc1A02oKIxWymqUW+psMfRiyT6HadHKrLlE4JXIYWIktHSO3EY1c3EJcdqcRylVz7eATkqEM/i3IGF9GUZNjP1DFDSb5NfKQSbFe9LmIU6miuYertCQB7xMraBG6RKPovGV0PvX/jt/R1cjHs0TG6t1T9gjMD2Ki6kepmIYe32m9QjbmL4hly8/ITU9MuuDT/rXvVl1/M5l6nUCdGj/2nmeP7Q2FQP4/QtgwQSJVEhV7cuJUPhqT0GAnKazyXlxXnPmKuAliE35/yX4bT9WwyryTMvoRcsWiqpezTZWXpNUGxWsWh0w+1HuIZXXVt4779lQWMFubOda3Pjz46zX8kJ+1ZVFeCLUr0bZJXot/5rn54xqR/JxivYcY1mnQjVpm1LzUc2wQGAeWnxxYR76VFz/CA+ezKYsph6/wSGHALXS/wr+H6Pi9yrGJ5HzQxVwKXfxwrwi3Ob3vDyN0hov5EL8k17TMx9bJwNkcmpfH6IZ2e79Z7wWsoRLwUQVq8zX13VIFMDuFyfcQzwkYL5oyeKA78HEil9VzYV4Bg0E6P1M2ia3ZSsW/6F/ZlWeRihYn6YcjZEYX6yMcA/j89MSfAIly1p8MkeLtR9Ao+54PLJyPQnzwOs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