diff --git a/SodaLive/Sources/Chat/Character/CharacterView.swift b/SodaLive/Sources/Chat/Character/CharacterView.swift index e2ff861..7de077f 100644 --- a/SodaLive/Sources/Chat/Character/CharacterView.swift +++ b/SodaLive/Sources/Chat/Character/CharacterView.swift @@ -13,6 +13,7 @@ struct CharacterView: View { private let horizontalPadding: CGFloat = 16 let onSelectCharacter: (Int) -> Void + let onSelectNewCharacterAll: () -> Void var body: some View { BaseView(isLoading: $viewModel.isLoading) { @@ -55,8 +56,7 @@ struct CharacterView: View { isShowRank: false, trailingTitle: "전체보기", onTapTrailing: { - AppState.shared - .setAppStep(step: .newCharacterAll) + onSelectNewCharacterAll() }, onTap: { ch in onSelectCharacter(ch.characterId) @@ -111,5 +111,8 @@ struct CharacterView: View { } #Preview { - CharacterView(onSelectCharacter: { _ in }) + CharacterView( + onSelectCharacter: { _ in }, + onSelectNewCharacterAll: {} + ) } diff --git a/SodaLive/Sources/Chat/ChatTabView.swift b/SodaLive/Sources/Chat/ChatTabView.swift index f7b8fa6..cf5c9ca 100644 --- a/SodaLive/Sources/Chat/ChatTabView.swift +++ b/SodaLive/Sources/Chat/ChatTabView.swift @@ -114,7 +114,7 @@ struct ChatTabView: View { Group { switch selectedTab { case .character: - CharacterView(onSelectCharacter: handleCharacterSelection) + CharacterView(onSelectCharacter: handleCharacterSelection, onSelectNewCharacterAll: handleCharacterSelection) case .talk: TalkView() }