Skip to content

Commit

Permalink
Merge pull request DroidKaigi#1227 from DroidKaigi/kenken/fix_floorma…
Browse files Browse the repository at this point in the history
…p_screenshot_test

[Android] add isTest flag for screenshot test for floormap
  • Loading branch information
tkhs0604 committed Sep 15, 2023
2 parents 0a05491 + 7008f22 commit 992558c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import io.github.droidkaigi.confsched2023.model.FloorLevel
import io.github.droidkaigi.confsched2023.model.SideEvents
import io.github.droidkaigi.confsched2023.ui.UserMessageStateHolder
import io.github.droidkaigi.confsched2023.ui.buildUiState
import io.github.droidkaigi.confsched2023.ui.isTest
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.datetime.Clock
Expand Down Expand Up @@ -69,6 +70,8 @@ class FloorMapScreenViewModel @Inject constructor(
}

private fun isTodayDay3(): Boolean {
if (isTest()) return false

val now = Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault())

val currentInTokyo = now.toInstant(TimeZone.currentSystemDefault()).toLocalDateTime(
Expand Down

0 comments on commit 992558c

Please sign in to comment.