Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

스케쥴 화면에서 이번 주 스케쥴 없을 때 "매숑이 밥주러 가기" 버튼 이동 연결 #525

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading