Skip to content

Commit

Permalink
fix: theme button click
Browse files Browse the repository at this point in the history
  • Loading branch information
makeevrserg committed Aug 11, 2023
1 parent a6f92e7 commit 9846b6d
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.FloatingActionButton
import androidx.compose.material.Icon
import androidx.compose.material.Scaffold
Expand All @@ -13,6 +14,7 @@ import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.WbSunny
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import com.makeevrserg.empireprojekt.mobile.core.ui.asComposableString
import com.makeevrserg.empireprojekt.mobile.core.ui.components.navBarsPadding
import com.makeevrserg.empireprojekt.mobile.core.ui.theme.AppTheme
Expand Down Expand Up @@ -60,10 +62,13 @@ fun StatusScreen(
imageVector = Icons.Filled.WbSunny,
contentDescription = null,
tint = AppTheme.materialColor.onPrimary,
modifier = Modifier.clickable {
val nextTheme = themeSwitcher.theme.value.next(ThemeSwitcher.Theme.values())
themeSwitcher.selectTheme(nextTheme)
}
modifier = Modifier
.clip(CircleShape)
.clickable {
val nextTheme =
themeSwitcher.theme.value.next(ThemeSwitcher.Theme.values())
themeSwitcher.selectTheme(nextTheme)
}
)
}
item {
Expand Down

0 comments on commit 9846b6d

Please sign in to comment.