Skip to content

Commit

Permalink
♻️ リネーム漏れの対応
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsutakein committed Dec 5, 2023
1 parent f7fe80f commit df257bd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public struct ComposeScheduleListScreen: UIViewControllerRepresentable {

public func makeUIViewController(context: Context) -> UIViewController {
return ScheduleListScreen_iosKt.ScheduleListRouteViewController(
viewModel: ScheduleListViewModel(
getParticipantScheduleListUseCase: Container.shared.get(
stateMachine: ScheduleListStateMachine(
getParticipantScheduleList: Container.shared.get(
type: GetParticipantScheduleListUseCase.self),
userMessageStateHolder: Container.shared.get(type: UserMessageStateHolder.self),
dateTimeFormatter: Container.shared.get(type: CommonNitoDateFormatter.self)
dateFormatter: Container.shared.get(type: CommonNitoDateFormatter.self)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public val scheduleFeatureModule: Module = module {
ScheduleListStateMachine(
getParticipantScheduleList = get(),
userMessageStateHolder = get(),
dateTimeFormatter = get(),
dateFormatter = get(),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private fun ScheduleListScreen(
if (confirmParticipateDialog is ConfirmParticipateDialogUiState.Show) {
ConfirmParticipateDialog(
schedule = confirmParticipateDialog.schedule,
dateTimeFormatter = uiState.dateTimeFormatter,
dateTimeFormatter = uiState.dateFormatter,
onParticipateRequest = { dispatch(ScheduleListIntent.ClickParticipateSchedule(it)) },
onDismissRequest = { dispatch(ScheduleListIntent.ClickDismissConfirmParticipateDialog) },
)
Expand All @@ -83,7 +83,7 @@ private fun ScheduleListScreen(
) {
ScheduleListSection(
scheduleList = uiState.scheduleList,
dateTimeFormatter = uiState.dateTimeFormatter,
dateTimeFormatter = uiState.dateFormatter,
modifier = Modifier.fillMaxSize(),
onScheduleClick = { dispatch(ScheduleListIntent.ClickShowConfirmParticipateDialog(it)) },
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import club.nito.core.domain.model.ParticipantSchedule
import club.nito.core.model.FetchMultipleContentResult

public data class ScheduleListScreenUiState(
val dateTimeFormatter: NitoDateFormatter,
val dateFormatter: NitoDateFormatter,
val scheduleList: FetchMultipleContentResult<ParticipantSchedule>,
val confirmParticipateDialog: ConfirmParticipateDialogUiState,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import moe.tlaster.precompose.viewmodel.viewModelScope
public class ScheduleListStateMachine(
getParticipantScheduleList: GetParticipantScheduleListUseCase,
public val userMessageStateHolder: UserMessageStateHolder,
private val dateTimeFormatter: NitoDateFormatter,
private val dateFormatter: NitoDateFormatter,
) : StateMachine(),
UserMessageStateHolder by userMessageStateHolder {
private val showConfirmParticipateSchedule = MutableStateFlow<ParticipantSchedule?>(null)
Expand All @@ -35,7 +35,7 @@ public class ScheduleListStateMachine(
scheduleList,
) { showConfirmParticipateSchedule, scheduleList ->
ScheduleListScreenUiState(
dateTimeFormatter = dateTimeFormatter,
dateFormatter = dateFormatter,
scheduleList = scheduleList,
confirmParticipateDialog = showConfirmParticipateSchedule
?.let(ConfirmParticipateDialogUiState::Show)
Expand All @@ -56,7 +56,7 @@ public class ScheduleListStateMachine(
is ScheduleListIntent.ClickParticipateSchedule -> {
showConfirmParticipateSchedule.emit(null)

val scheduledAt = dateTimeFormatter.formatDateTime(intent.schedule.scheduledAt)
val scheduledAt = dateFormatter.formatDateTime(intent.schedule.scheduledAt)
userMessageStateHolder.showMessage("$scheduledAt に参加登録しました 🎉")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import platform.UIKit.UIViewController

@Suppress("FunctionName")
public fun ScheduleListRouteViewController(
viewModel: ScheduleListStateMachine,
stateMachine: ScheduleListStateMachine,
): UIViewController = ComposeUIViewController {
NitoTheme {
ScheduleListRoute(
stateMachine = viewModel,
stateMachine = stateMachine,
)
}
}

0 comments on commit df257bd

Please sign in to comment.