refactor(navigation): 전역 경로 기반 단일 내비게이션 흐름으로 전환한다

This commit is contained in:
Yu Sung
2026-03-06 16:34:44 +09:00
parent f145de87aa
commit 42ce09d927
34 changed files with 1181 additions and 873 deletions

View File

@@ -25,7 +25,7 @@ struct CreatorCommunityCommentListView: View {
@StateObject var viewModel = CreatorCommunityCommentListViewModel()
var body: some View {
NavigationView {
Group {
ZStack {
VStack(spacing: 0) {
HStack(spacing: 0) {

View File

@@ -56,12 +56,15 @@ struct CreatorCommunityAllView: View {
.sheet(
isPresented: $viewModel.isShowCommentListView,
content: {
CreatorCommunityCommentListView(
isPresented: $viewModel.isShowCommentListView,
creatorId: creatorId,
postId: viewModel.postId,
isShowSecret: viewModel.isShowSecret
)
NavigationStack {
CreatorCommunityCommentListView(
isPresented: $viewModel.isShowCommentListView,
creatorId: creatorId,
postId: viewModel.postId,
isShowSecret: viewModel.isShowSecret
)
}
.toolbar(.hidden, for: .navigationBar)
}
)

View File

@@ -26,6 +26,7 @@ struct UserProfileView: View {
@State private var isShowChannelDonationDialog: Bool = false
@State private var didTriggerAutoBackOnLoadFailure: Bool = false
@State private var isViewVisible: Bool = false
@State private var loadedUserId: Int? = nil
@State private var maxCommunityPostHeight: CGFloat? = nil
@@ -639,7 +640,12 @@ struct UserProfileView: View {
.onAppear {
isViewVisible = true
didTriggerAutoBackOnLoadFailure = false
viewModel.getCreatorProfile(userId: userId)
if loadedUserId != userId || viewModel.creatorProfile == nil {
loadedUserId = userId
viewModel.getCreatorProfile(userId: userId)
}
AppState.shared.pushChannelId = 0
}
.onDisappear {