diff --git a/app/src/main/java/com/mashup/ui/schedule/ScheduleRoute.kt b/app/src/main/java/com/mashup/ui/schedule/ScheduleRoute.kt index 07cb9021..d18083ff 100644 --- a/app/src/main/java/com/mashup/ui/schedule/ScheduleRoute.kt +++ b/app/src/main/java/com/mashup/ui/schedule/ScheduleRoute.kt @@ -52,6 +52,7 @@ import com.mashup.ui.main.MainViewModel import com.mashup.ui.schedule.component.ScheduleTabRow import com.mashup.ui.schedule.detail.ScheduleDetailActivity import com.mashup.ui.schedule.model.ScheduleType +import com.mashup.ui.webview.mashong.MashongActivity import com.mashup.util.AnalyticsManager import com.mashup.core.common.R as CR @@ -140,6 +141,7 @@ fun ScheduleRoute( scheduleState = scheduleState, onClickScheduleInformation = { context.moveToScheduleInformation(it) }, onClickAttendance = { context.moveToAttendance(it) }, + onClickMashongButton = { context.moveToMashong() }, refreshState = isRefreshing, scheduleType = ScheduleType.values()[selectedTabIndex] ) @@ -193,6 +195,12 @@ fun Context.moveToAttendance(scheduleId: Int) { ) } +fun Context.moveToMashong() { + startActivity( + MashongActivity.newIntent(this) + ) +} + @Composable fun ScheduleTopbar(title: String) { Row( diff --git a/app/src/main/java/com/mashup/ui/schedule/ScheduleScreen.kt b/app/src/main/java/com/mashup/ui/schedule/ScheduleScreen.kt index 794de2ec..479606b4 100644 --- a/app/src/main/java/com/mashup/ui/schedule/ScheduleScreen.kt +++ b/app/src/main/java/com/mashup/ui/schedule/ScheduleScreen.kt @@ -12,6 +12,7 @@ fun ScheduleScreen( scheduleType: ScheduleType = ScheduleType.WEEK, onClickScheduleInformation: (Int) -> Unit = {}, onClickAttendance: (Int) -> Unit = {}, + onClickMashongButton: () -> Unit = {}, refreshState: Boolean = false ) { when (scheduleType) { @@ -21,6 +22,7 @@ fun ScheduleScreen( modifier = modifier, onClickScheduleInformation = onClickScheduleInformation, onClickAttendance = onClickAttendance, + onClickMashongButton = onClickMashongButton, refreshState = refreshState ) } diff --git a/app/src/main/java/com/mashup/ui/schedule/component/WeeklySchedule.kt b/app/src/main/java/com/mashup/ui/schedule/component/WeeklySchedule.kt index 12edd69b..ebc9e7ac 100644 --- a/app/src/main/java/com/mashup/ui/schedule/component/WeeklySchedule.kt +++ b/app/src/main/java/com/mashup/ui/schedule/component/WeeklySchedule.kt @@ -31,6 +31,7 @@ fun WeeklySchedule( modifier: Modifier = Modifier, onClickScheduleInformation: (Int) -> Unit = {}, onClickAttendance: (Int) -> Unit = {}, + onClickMashongButton: () -> Unit = {}, refreshState: Boolean = false ) { var cacheScheduleState by remember { @@ -60,7 +61,8 @@ fun WeeklySchedule( if (castingState.weeklySchedule.isEmpty()) { EmptyScheduleItem( - modifier = modifier + modifier = modifier, + onClickMashongButton = onClickMashongButton ) } else { HorizontalPager(