Skip to content

Commit

Permalink
Merge pull request #1041 from DroidKaigi/takahirom/add-day-to-timeslo…
Browse files Browse the repository at this point in the history
…t/2024-09-11

Add day to TimeSlot
  • Loading branch information
takahirom authored Sep 11, 2024
2 parents 4862d8a + 05e3e27 commit fc8059e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
buildConfig = true
}
defaultConfig {
versionCode = 9
versionName = "1.5.0"
versionCode = 10
versionName = "1.5.1"
}
signingConfigs {
create("dev") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ fun FavoritesScreenPreview() {
currentDayFilter = persistentListOf(DroidKaigi2024Day.ConferenceDay1),
timetableItemMap = persistentMapOf(
TimeSlot(
day = DroidKaigi2024Day.ConferenceDay1,
startTimeString = "10:00",
endTimeString = "11:00",
) to listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private fun favoritesSheet(
),
)
.timetableItems.groupBy {
TimeSlot(it.startsTimeString, it.endsTimeString)
TimeSlot(it.day, it.startsTimeString, it.endsTimeString)
}.mapValues { entry ->
entry.value.sortedWith(
compareBy({ it.day?.name.orEmpty() }, { it.startsTimeString }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import io.github.droidkaigi.confsched.droidkaigiui.component.TimetableItemTag
import io.github.droidkaigi.confsched.droidkaigiui.component.TimetableTime
import io.github.droidkaigi.confsched.droidkaigiui.icon
import io.github.droidkaigi.confsched.favorites.section.FavoritesSheetUiState.FavoriteListUiState.TimeSlot
import io.github.droidkaigi.confsched.model.DroidKaigi2024Day
import io.github.droidkaigi.confsched.model.TimetableItem
import io.github.droidkaigi.confsched.model.TimetableItem.Session
import io.github.droidkaigi.confsched.model.fake
Expand Down Expand Up @@ -162,6 +163,7 @@ fun FavoriteListPreview() {
FavoriteList(
timetableItemMap = persistentMapOf(
TimeSlot(
day = DroidKaigi2024Day.ConferenceDay1,
startTimeString = "10:00",
endTimeString = "11:00",
) to listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ sealed interface FavoritesSheetUiState {
val timetableItemMap: PersistentMap<TimeSlot, List<TimetableItem>>,
) : FavoritesSheetUiState {
data class TimeSlot(
val day: DroidKaigi2024Day?,
val startTimeString: String,
val endTimeString: String,
) {
val key: String get() = "$startTimeString-$endTimeString"
val key: String get() = "${day?.ordinal}-$startTimeString-$endTimeString"
}
}

Expand Down Expand Up @@ -187,6 +188,7 @@ fun FavoriteSheetPreview() {
currentDayFilter = persistentListOf(ConferenceDay1, ConferenceDay2),
timetableItemMap = persistentMapOf(
TimeSlot(
day = DroidKaigi2024Day.ConferenceDay1,
startTimeString = "10:00",
endTimeString = "11:00",
) to listOf(
Expand Down

0 comments on commit fc8059e

Please sign in to comment.