From d7d616043387fe756ce6e8df15cdf07b54352d9f Mon Sep 17 00:00:00 2001 From: Ryo Takeuchi Date: Thu, 7 Dec 2023 23:03:35 +0900 Subject: [PATCH] =?UTF-8?q?:wastebasket:=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=91=E3=83=86=E3=82=A3=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/schedule/detail/ScheduleDetailScreenUiState.kt | 6 ------ .../feature/schedule/detail/ScheduleDetailStateMachine.kt | 7 +------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailScreenUiState.kt b/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailScreenUiState.kt index 52b68324..fe40da89 100644 --- a/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailScreenUiState.kt +++ b/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailScreenUiState.kt @@ -9,10 +9,4 @@ public data class ScheduleDetailScreenUiState( val dateFormatter: NitoDateFormatter, val schedule: FetchSingleContentResult, val myParticipantStatus: FetchSingleContentResult, - val confirmParticipateDialog: ConfirmParticipateDialogUiState, ) - -public sealed class ConfirmParticipateDialogUiState { - public data class Show(val schedule: ParticipantSchedule) : ConfirmParticipateDialogUiState() - public data object Hide : ConfirmParticipateDialogUiState() -} diff --git a/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailStateMachine.kt b/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailStateMachine.kt index 83f241fa..407f334e 100644 --- a/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailStateMachine.kt +++ b/feature/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailStateMachine.kt @@ -28,24 +28,19 @@ public class ScheduleDetailStateMachine( private val dateTimeFormatter: NitoDateFormatter, ) : StateMachine(), UserMessageStateHolder by userMessageStateHolder { - private val showConfirmParticipateSchedule = MutableStateFlow(null) private val participantSchedule: MutableStateFlow> = MutableStateFlow(FetchSingleContentResult.Loading) private val myParticipantStatus: MutableStateFlow> = MutableStateFlow(FetchSingleContentResult.Loading) public val uiState: StateFlow = buildUiState( - showConfirmParticipateSchedule, participantSchedule, myParticipantStatus, - ) { showConfirmParticipateSchedule, participantSchedule, myParticipantStatus -> + ) { participantSchedule, myParticipantStatus -> ScheduleDetailScreenUiState( dateFormatter = dateTimeFormatter, schedule = participantSchedule, myParticipantStatus = myParticipantStatus, - confirmParticipateDialog = showConfirmParticipateSchedule - ?.let(ConfirmParticipateDialogUiState::Show) - ?: ConfirmParticipateDialogUiState.Hide, ) }