refactor(navigation): 전역 경로 기반 단일 내비게이션 흐름으로 전환한다
This commit is contained in:
@@ -25,7 +25,7 @@ struct CreatorCommunityCommentListView: View {
|
||||
@StateObject var viewModel = CreatorCommunityCommentListViewModel()
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
Group {
|
||||
ZStack {
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 0) {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user