Skip to content

Commit

Permalink
Merge pull request #1198 from wakmusic/1196-hide-fab-editing
Browse files Browse the repository at this point in the history
🔀 :: (#1196) notiname 변경 및 마이 플리 편집모드 버그 해결
  • Loading branch information
yongbeomkwak authored Aug 19, 2024
2 parents 80db363 + 1233cd1 commit ef0482b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public extension EditSheetViewType where Self: UIViewController {
bottomSheetView.present(in: view)

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 숨깁니다.
NotificationCenter.default.post(name: .willShowSongCart, object: nil)
NotificationCenter.default.post(name: .shouldHidePlaylistFloatingButton, object: nil)
}

/// 편집하기 팝업을 제거합니다.
Expand All @@ -66,6 +66,6 @@ public extension EditSheetViewType where Self: UIViewController {
self.bottomSheetView = nil

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 다시 보여줍니다.
NotificationCenter.default.post(name: .willHideSongCart, object: nil)
NotificationCenter.default.post(name: .shouldShowPlaylistFloatingButton, object: nil)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public extension PlaylistEditSheetViewType where Self: UIViewController {
bottomSheetView.present(in: view)

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 숨깁니다.
NotificationCenter.default.post(name: .willShowSongCart, object: nil)
NotificationCenter.default.post(name: .shouldHidePlaylistFloatingButton, object: nil)
}

/// 편집하기 팝업을 제거합니다.
Expand All @@ -57,6 +57,6 @@ public extension PlaylistEditSheetViewType where Self: UIViewController {
self.bottomSheetView = nil

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 다시 보여줍니다.
NotificationCenter.default.post(name: .willHideSongCart, object: nil)
NotificationCenter.default.post(name: .shouldShowPlaylistFloatingButton, object: nil)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public extension SongCartViewType where Self: UIViewController {
bottomSheetView.present(in: view)

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 숨깁니다.
NotificationCenter.default.post(name: .willShowSongCart, object: nil)
NotificationCenter.default.post(name: .shouldHidePlaylistFloatingButton, object: nil)
}

/// 노래 담기 팝업을 제거합니다.
Expand All @@ -92,6 +92,6 @@ public extension SongCartViewType where Self: UIViewController {
self.bottomSheetView = nil

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 다시 보여줍니다.
NotificationCenter.default.post(name: .willHideSongCart, object: nil)
NotificationCenter.default.post(name: .shouldShowPlaylistFloatingButton, object: nil)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public extension WMBottomSheetViewType where Self: UIViewController {
bottomSheetView.present(in: view)

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 숨깁니다.
NotificationCenter.default.post(name: .willShowSongCart, object: nil)
NotificationCenter.default.post(name: .shouldHidePlaylistFloatingButton, object: nil)
}

/// 편집하기 팝업을 제거합니다.
Expand All @@ -52,7 +52,7 @@ public extension WMBottomSheetViewType where Self: UIViewController {

// 메인 컨테이너 뷰컨에서 해당 노티를 수신, 팝업이 올라오면 미니 플레이어를 다시 보여줍니다.
if postNoti {
NotificationCenter.default.post(name: .willHideSongCart, object: nil)
NotificationCenter.default.post(name: .shouldShowPlaylistFloatingButton, object: nil)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public extension UIViewController {
)

bottomSheetView.present(in: self.view)
NotificationCenter.default.post(name: .willShowSongCart, object: nil)
NotificationCenter.default.post(name: .shouldHidePlaylistFloatingButton, object: nil)
}

func hideInlineBottomSheet() {
Expand All @@ -77,6 +77,6 @@ public extension UIViewController {
.last as? BottomSheetView else { return }

bottomSheetView.dismiss()
NotificationCenter.default.post(name: .willHideSongCart, object: nil)
NotificationCenter.default.post(name: .shouldShowPlaylistFloatingButton, object: nil)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private extension MainContainerViewController {
.disposed(by: disposeBag)

NotificationCenter.default.rx
.notification(.willShowSongCart)
.notification(.shouldHidePlaylistFloatingButton)
.subscribe(onNext: { [playlistFloatingActionButton] _ in
UIView.animate(withDuration: 0.2) {
playlistFloatingActionButton.alpha = 0
Expand All @@ -159,7 +159,7 @@ private extension MainContainerViewController {
.disposed(by: disposeBag)

NotificationCenter.default.rx
.notification(.willHideSongCart)
.notification(.shouldShowPlaylistFloatingButton)
.subscribe(onNext: { [playlistFloatingActionButton] _ in
UIView.animate(withDuration: 0.2) {
playlistFloatingActionButton.alpha = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ private extension MyPlaylistDetailReactor {
let backUpPlaylist = state.backupPlaylistModels

return .concat([
updateComplectionButtonVisible(flag: false),
.just(Mutation.updateEditingState(false)),
.just(Mutation.updatePlaylist(backUpPlaylist)),
.just(.updateSelectedCount(0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public extension Notification.Name {
static let willRefreshUserInfo = Notification.Name("willRefreshUserInfo") // 유저 정보 갱신
static let willStatusBarEnterDarkBackground = Notification.Name("willStatusBarEnterDarkBackground")
static let willStatusBarEnterLightBackground = Notification.Name("willStatusBarEnterLightBackground")
static let willShowSongCart = Notification.Name("willShowSongCart")
static let willHideSongCart = Notification.Name("willHideSongCart")
static let shouldHidePlaylistFloatingButton = Notification.Name("shouldHidePlaylistFloatingButton")
static let shouldShowPlaylistFloatingButton = Notification.Name("shouldShowPlaylistFloatingButton")
static let didChangeTabInStorage = Notification.Name("didChangeTabInStorage")
}

0 comments on commit ef0482b

Please sign in to comment.