From 59f81e50c30ec03446694361cad6e873000ea7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EB=AF=BC=EC=A7=80?= <21200203@mobmail.shinhan.com> Date: Thu, 8 Aug 2024 17:08:26 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B8=20=EC=8A=A4=EC=BC=80=EC=A5=B4=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=97=90=EC=84=9C=20=EC=9D=B4=EB=B2=88=20?= =?UTF-8?q?=EC=A3=BC=20=EC=8A=A4=EC=BC=80=EC=A5=B4=20=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=20"=EB=A7=A4=EC=88=91=EC=9D=B4=20=EB=B0=A5=EC=A3=BC?= =?UTF-8?q?=EB=9F=AC=20=EA=B0=80=EA=B8=B0"=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/mashup/ui/schedule/ScheduleRoute.kt | 8 ++++++++ .../main/java/com/mashup/ui/schedule/ScheduleScreen.kt | 2 ++ .../com/mashup/ui/schedule/component/WeeklySchedule.kt | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) 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(