Skip to content

Commit

Permalink
🗑️ 不要なプロパティを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsutakein committed Dec 7, 2023
1 parent 3f40066 commit d7d6160
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,4 @@ public data class ScheduleDetailScreenUiState(
val dateFormatter: NitoDateFormatter,
val schedule: FetchSingleContentResult<ParticipantSchedule>,
val myParticipantStatus: FetchSingleContentResult<ParticipantStatus>,
val confirmParticipateDialog: ConfirmParticipateDialogUiState,
)

public sealed class ConfirmParticipateDialogUiState {
public data class Show(val schedule: ParticipantSchedule) : ConfirmParticipateDialogUiState()
public data object Hide : ConfirmParticipateDialogUiState()
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,19 @@ public class ScheduleDetailStateMachine(
private val dateTimeFormatter: NitoDateFormatter,
) : StateMachine(),
UserMessageStateHolder by userMessageStateHolder {
private val showConfirmParticipateSchedule = MutableStateFlow<ParticipantSchedule?>(null)
private val participantSchedule: MutableStateFlow<FetchSingleContentResult<ParticipantSchedule>> =
MutableStateFlow(FetchSingleContentResult.Loading)
private val myParticipantStatus: MutableStateFlow<FetchSingleContentResult<ParticipantStatus>> =
MutableStateFlow(FetchSingleContentResult.Loading)

public val uiState: StateFlow<ScheduleDetailScreenUiState> = buildUiState(
showConfirmParticipateSchedule,
participantSchedule,
myParticipantStatus,
) { showConfirmParticipateSchedule, participantSchedule, myParticipantStatus ->
) { participantSchedule, myParticipantStatus ->
ScheduleDetailScreenUiState(
dateFormatter = dateTimeFormatter,
schedule = participantSchedule,
myParticipantStatus = myParticipantStatus,
confirmParticipateDialog = showConfirmParticipateSchedule
?.let(ConfirmParticipateDialogUiState::Show)
?: ConfirmParticipateDialogUiState.Hide,
)
}

Expand Down

0 comments on commit d7d6160

Please sign in to comment.