Skip to content

Commit

Permalink
🧸 스케쥴 화면에서 이번 주 스케쥴 없을 때 "매숑이 밥주러 가기" 버튼 이동 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
정민지 committed Aug 8, 2024
1 parent e7d94ab commit 59f81e5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/src/main/java/com/mashup/ui/schedule/ScheduleRoute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
)
Expand Down Expand Up @@ -193,6 +195,12 @@ fun Context.moveToAttendance(scheduleId: Int) {
)
}

fun Context.moveToMashong() {
startActivity(
MashongActivity.newIntent(this)
)
}

@Composable
fun ScheduleTopbar(title: String) {
Row(
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/mashup/ui/schedule/ScheduleScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fun ScheduleScreen(
scheduleType: ScheduleType = ScheduleType.WEEK,
onClickScheduleInformation: (Int) -> Unit = {},
onClickAttendance: (Int) -> Unit = {},
onClickMashongButton: () -> Unit = {},
refreshState: Boolean = false
) {
when (scheduleType) {
Expand All @@ -21,6 +22,7 @@ fun ScheduleScreen(
modifier = modifier,
onClickScheduleInformation = onClickScheduleInformation,
onClickAttendance = onClickAttendance,
onClickMashongButton = onClickMashongButton,
refreshState = refreshState
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fun WeeklySchedule(
modifier: Modifier = Modifier,
onClickScheduleInformation: (Int) -> Unit = {},
onClickAttendance: (Int) -> Unit = {},
onClickMashongButton: () -> Unit = {},
refreshState: Boolean = false
) {
var cacheScheduleState by remember {
Expand Down Expand Up @@ -60,7 +61,8 @@ fun WeeklySchedule(

if (castingState.weeklySchedule.isEmpty()) {
EmptyScheduleItem(
modifier = modifier
modifier = modifier,
onClickMashongButton = onClickMashongButton
)
} else {
HorizontalPager(
Expand Down

0 comments on commit 59f81e5

Please sign in to comment.