Skip to content

Commit

Permalink
Merge pull request #1120 from Corvus400/fix/floor_number_of_the_room
Browse files Browse the repository at this point in the history
🔧 Correctly indicated that the third day room is on the first floor, not the basement.
  • Loading branch information
takahirom authored Sep 8, 2023
2 parents d3951b8 + 6edbce3 commit 40a4bb8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ enum class RoomType {
RoomC,
RoomD,
RoomE,
RoomDE,
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,6 +19,7 @@ class PreviewTimeTableItemRoomProvider : PreviewParameterProvider<TimetableItem>
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()),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
}
}

0 comments on commit 40a4bb8

Please sign in to comment.