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

Fix some typos and indention #97

Merged
merged 1 commit into from
Apr 19, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import fr.paug.androidmakers.ui.viewmodel.LceViewModel
import fr.paug.androidmakers.util.EmojiUtils
import fr.paug.androidmakers.util.TimeUtils
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
import java.text.DateFormat
import java.util.*

Expand Down Expand Up @@ -71,7 +70,7 @@ fun AgendaLayout(
}
}

class AgendLayoutViewModel: LceViewModel<Agenda>() {
class AgendaLayoutViewModel: LceViewModel<Agenda>() {
override fun produce(): Flow<Result<Agenda>> {
return AndroidMakersApplication.instance().store.getAgenda()
}
Expand All @@ -82,7 +81,7 @@ private fun AgendaPagerOrLoading(
sessionFilters: List<SessionFilter>,
onSessionClick: (sessionId: String, roomId: String, startTimestamp: Long, endTimestamp: Long) -> Unit,
) {
ButtonRefreshableLceLayout(viewModel<AgendLayoutViewModel>()){
ButtonRefreshableLceLayout(viewModel<AgendaLayoutViewModel>()){
val days = agendaToDays(it)

AgendaPager(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fun AgendaPager(
count = days.size,
state = pagerState,
) { page ->
val viewModel = viewModel<AgendLayoutViewModel>()
val viewModel = viewModel<AgendaLayoutViewModel>()
SwipeRefreshableLceLayout(viewModel = viewModel) {
val days = agendaToDays(it)
val items = days[page].roomSchedules.flatMap { it.scheduleSessions }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
package fr.androidmakers.store

import fr.androidmakers.store.model.*
import kotlinx.coroutines.flow.*
import fr.androidmakers.store.model.Agenda
import fr.androidmakers.store.model.Partner
import fr.androidmakers.store.model.Room
import fr.androidmakers.store.model.ScheduleSlot
import fr.androidmakers.store.model.Session
import fr.androidmakers.store.model.Speaker
import fr.androidmakers.store.model.Venue
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine

/**
*
Expand Down Expand Up @@ -39,11 +46,11 @@ interface AndroidMakersStore {
} else {
Result.success(
Agenda(
sessions.getOrThrow().associateBy { it.id },
slots.getOrThrow(),
rooms.getOrThrow().associateBy { it.id },
speakers.getOrThrow().associateBy { it.id }
)
sessions.getOrThrow().associateBy { it.id },
slots.getOrThrow(),
rooms.getOrThrow().associateBy { it.id },
speakers.getOrThrow().associateBy { it.id }
)
)
}
}
Expand Down