Skip to content

Commit

Permalink
Added minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
myofficework000 committed Jul 23, 2024
1 parent cf304c4 commit a899258
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import org.junit.Test

class NumberScreenTest {


@get:Rule
val composeTestRule = createComposeRule()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -40,10 +40,10 @@ private fun LessonContent() {
Constants.MAP_DEFAULT_ZOOM_1
)
}
val currentPage = rememberSaveable { mutableStateOf(0) }
val currentPage = rememberSaveable { mutableIntStateOf(0) }
val mapType = remember {
derivedStateOf {
when (currentPage.value) {
when (currentPage.intValue) {
1 -> MapType.NORMAL
2 -> MapType.SATELLITE
3 -> MapType.HYBRID
Expand All @@ -61,7 +61,8 @@ private fun LessonContent() {
Modifier
.fillMaxSize()
.background(PAGER_BACKGROUND)
.padding(it)) {
.padding(it)
) {
LessonHeader(
stringArrayResource(R.array.l5c2_header_text)[currentPage.value],
Modifier
Expand Down

0 comments on commit a899258

Please sign in to comment.