refactor(toast): 공통 토스트 모디파이어를 적용한다

This commit is contained in:
Yu Sung
2026-03-13 16:32:57 +09:00
parent 19f5cc8ad6
commit fb85f3e90c
95 changed files with 261 additions and 1729 deletions

View File

@@ -462,28 +462,7 @@ struct LiveRoomViewV2: View {
}
}
}
.popup(isPresented: $viewModel.isShowErrorPopup, type: .toast, position: .top, autohideIn: 1.3) {
GeometryReader { geo in
HStack {
Spacer()
Text(viewModel.errorMessage)
.padding(.vertical, 13.3)
.frame(width: geo.size.width - 66.7, alignment: .center)
.appFont(size: 12, weight: .medium)
.background(Color.button)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.cornerRadius(20)
.padding(.top, 66.7)
Spacer()
}
.onDisappear {
if viewModel.liveRoomInfo == nil {
viewModel.quitRoom()
}
}
}
}
.sodaToast(isPresented: $viewModel.isShowErrorPopup, message: viewModel.errorMessage, autohideIn: 1.3)
.cornerRadius(16.7, corners: [.topLeft, .topRight])
.offset(y: -(keyboardHandler.keyboardHeight > 0 ? keyboardHandler.keyboardHeight : 0))
.onAppear {
@@ -644,23 +623,7 @@ struct LiveRoomViewV2: View {
}
)
.padding(20)
.popup(isPresented: $viewModel.isShowReportPopup, type: .toast, position: .top, autohideIn: 1.3) {
GeometryReader { geo in
HStack {
Spacer()
Text(viewModel.reportMessage)
.padding(.vertical, 13.3)
.frame(width: geo.size.width - 66.7, alignment: .center)
.appFont(size: 12, weight: .medium)
.background(Color.button)
.foregroundColor(Color.white)
.multilineTextAlignment(.center)
.cornerRadius(20)
.padding(.top, 66.7)
Spacer()
}
}
}
.sodaToast(isPresented: $viewModel.isShowReportPopup, message: viewModel.reportMessage, autohideIn: 1.3)
}
if viewModel.isShowReportMenu {