From 6edbce3780a1bf0ea1384312ae02cfd53932c185 Mon Sep 17 00:00:00 2001 From: todayama_r <13657682+Corvus400@users.noreply.github.com> Date: Fri, 8 Sep 2023 19:41:37 +0900 Subject: [PATCH] :wrench: Correctly indicated that the third day room is on the first floor, not the basement. The room on the third day will be the room where D and E are combined. https://twitter.com/mhidaka/status/1700079778643198299 --- .../confsched2023/data/sessions/DefaultSessionsApiClient.kt | 4 +++- .../io/github/droidkaigi/confsched2023/model/RoomType.kt | 1 + .../io/github/droidkaigi/confsched2023/model/TimetableRoom.kt | 2 ++ .../sessions/component/PreviewTimeTableItemRoomProvider.kt | 2 ++ .../confsched2023/sessions/component/TimetableRoom.kt | 3 +++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/data/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/data/sessions/DefaultSessionsApiClient.kt b/core/data/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/data/sessions/DefaultSessionsApiClient.kt index 5be8b9445..6715130bf 100644 --- a/core/data/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/data/sessions/DefaultSessionsApiClient.kt +++ b/core/data/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/data/sessions/DefaultSessionsApiClient.kt @@ -12,6 +12,7 @@ import io.github.droidkaigi.confsched2023.model.RoomType.RoomA import io.github.droidkaigi.confsched2023.model.RoomType.RoomB import io.github.droidkaigi.confsched2023.model.RoomType.RoomC import io.github.droidkaigi.confsched2023.model.RoomType.RoomD +import io.github.droidkaigi.confsched2023.model.RoomType.RoomDE import io.github.droidkaigi.confsched2023.model.RoomType.RoomE import io.github.droidkaigi.confsched2023.model.Timetable import io.github.droidkaigi.confsched2023.model.TimetableAsset @@ -167,7 +168,8 @@ private fun LocaledResponse.toRoomType() = when (en?.lowercase()) { "chipmunk" -> RoomC "dolphin" -> RoomD "electric eel" -> RoomE - else -> RoomA + // Assume the room on the third day. + else -> RoomDE } internal fun String.toInstantAsJST(): Instant { diff --git a/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/RoomType.kt b/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/RoomType.kt index 7edffad9a..1d6d0f0bc 100644 --- a/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/RoomType.kt +++ b/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/RoomType.kt @@ -9,4 +9,5 @@ enum class RoomType { RoomC, RoomD, RoomE, + RoomDE, } diff --git a/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/TimetableRoom.kt b/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/TimetableRoom.kt index c496dabeb..43462e154 100644 --- a/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/TimetableRoom.kt +++ b/core/model/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/model/TimetableRoom.kt @@ -26,6 +26,8 @@ val TimetableRoom.nameAndFloor: String RoomType.RoomC -> basementFloorString.currentLangTitle RoomType.RoomD -> "1F" RoomType.RoomE -> "1F" + // Assume the room on the third day. + RoomType.RoomDE -> "1F" } return "${name.currentLangTitle} ($floor)" } diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/PreviewTimeTableItemRoomProvider.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/PreviewTimeTableItemRoomProvider.kt index 500b58ad8..225b07412 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/PreviewTimeTableItemRoomProvider.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/PreviewTimeTableItemRoomProvider.kt @@ -5,6 +5,7 @@ import io.github.droidkaigi.confsched2023.model.RoomType.RoomA import io.github.droidkaigi.confsched2023.model.RoomType.RoomB import io.github.droidkaigi.confsched2023.model.RoomType.RoomC import io.github.droidkaigi.confsched2023.model.RoomType.RoomD +import io.github.droidkaigi.confsched2023.model.RoomType.RoomDE import io.github.droidkaigi.confsched2023.model.TimetableItem import io.github.droidkaigi.confsched2023.model.TimetableItem.Session import io.github.droidkaigi.confsched2023.model.fake @@ -18,6 +19,7 @@ class PreviewTimeTableItemRoomProvider : PreviewParameterProvider Session.fake().copy(room = Session.fake().room.copy(type = RoomA)), Session.fake().copy(room = Session.fake().room.copy(type = RoomB)), Session.fake().copy(room = Session.fake().room.copy(type = RoomD)), + Session.fake().copy(room = Session.fake().room.copy(type = RoomDE)), Session.fake().copy(speakers = persistentListOf(Session.fake().speakers.first())), Session.fake().copy(speakers = persistentListOf()), ) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/TimetableRoom.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/TimetableRoom.kt index 93ca64554..51c7c9eb8 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/TimetableRoom.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/TimetableRoom.kt @@ -7,6 +7,7 @@ import io.github.droidkaigi.confsched2023.model.RoomType.RoomA import io.github.droidkaigi.confsched2023.model.RoomType.RoomB import io.github.droidkaigi.confsched2023.model.RoomType.RoomC import io.github.droidkaigi.confsched2023.model.RoomType.RoomD +import io.github.droidkaigi.confsched2023.model.RoomType.RoomDE import io.github.droidkaigi.confsched2023.model.RoomType.RoomE import io.github.droidkaigi.confsched2023.model.TimetableRoom @@ -20,6 +21,8 @@ internal val TimetableRoom.color: Color RoomC -> colors.hallC RoomD -> colors.hallD RoomE -> colors.hallE + // The color of D is set as workaround. + RoomDE -> colors.hallD else -> Color.White } }