From 88389e22cdc4b0d05e432bf112f9641fecf14688 Mon Sep 17 00:00:00 2001 From: FunkyMuse Date: Mon, 9 Oct 2023 12:00:00 +0200 Subject: [PATCH] build: update to latest commons --- .../com/simplemobiletools/thankyou/screens/MainScreen.kt | 9 ++++++--- .../simplemobiletools/thankyou/screens/SettingsScreen.kt | 6 ++---- gradle/libs.versions.toml | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/MainScreen.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/MainScreen.kt index d13f79c..e6e5e0b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/MainScreen.kt +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/MainScreen.kt @@ -20,10 +20,13 @@ import androidx.compose.ui.unit.sp import androidx.compose.ui.viewinterop.AndroidView import com.simplemobiletools.commons.R import com.simplemobiletools.commons.compose.extensions.MyDevices +import com.simplemobiletools.commons.compose.lists.SimpleLazyListScaffold +import com.simplemobiletools.commons.compose.lists.simpleTopAppBarColors +import com.simplemobiletools.commons.compose.lists.topAppBarInsets +import com.simplemobiletools.commons.compose.lists.topAppBarPaddings import com.simplemobiletools.commons.compose.menus.ActionItem import com.simplemobiletools.commons.compose.menus.ActionMenu import com.simplemobiletools.commons.compose.menus.OverflowMode -import com.simplemobiletools.commons.compose.settings.scaffold.* import com.simplemobiletools.commons.compose.theme.AppThemeSurface import com.simplemobiletools.commons.compose.theme.SimpleTheme import kotlinx.collections.immutable.toImmutableList @@ -36,7 +39,7 @@ internal fun MainScreen( moreAppsFromUs: () -> Unit, linkColor: Color, ) { - SettingsLazyScaffold(customTopBar = { scrolledColor: Color, _: MutableInteractionSource, scrollBehavior: TopAppBarScrollBehavior, statusBarColor: Int, colorTransitionFraction: Float, contrastColor: Color -> + SimpleLazyListScaffold(customTopBar = { scrolledColor: Color, _: MutableInteractionSource, scrollBehavior: TopAppBarScrollBehavior, statusBarColor: Int, colorTransitionFraction: Float, contrastColor: Color -> TopAppBar( title = {}, actions = { @@ -45,7 +48,7 @@ internal fun MainScreen( ActionMenu(items = actionMenus, numIcons = 2, isMenuVisible = isMenuVisible, onMenuToggle = { isMenuVisible = it }, iconsColor = scrolledColor) }, scrollBehavior = scrollBehavior, - colors = topAppBarColors(statusBarColor, colorTransitionFraction, contrastColor), + colors = simpleTopAppBarColors(statusBarColor, colorTransitionFraction, contrastColor), modifier = Modifier.topAppBarPaddings(), windowInsets = topAppBarInsets() ) diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/SettingsScreen.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/SettingsScreen.kt index aa98d30..9b85d5f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/SettingsScreen.kt +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/screens/SettingsScreen.kt @@ -1,15 +1,13 @@ package com.simplemobiletools.thankyou.screens -import androidx.compose.material3.HorizontalDivider import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import com.simplemobiletools.commons.R import com.simplemobiletools.commons.compose.extensions.MyDevices +import com.simplemobiletools.commons.compose.lists.SimpleColumnScaffold import com.simplemobiletools.commons.compose.settings.* -import com.simplemobiletools.commons.compose.settings.scaffold.SettingsScaffold import com.simplemobiletools.commons.compose.theme.AppThemeSurface import com.simplemobiletools.commons.compose.theme.SimpleTheme -import com.simplemobiletools.commons.compose.theme.divider_grey import com.simplemobiletools.commons.helpers.isTiramisuPlus @Composable @@ -24,7 +22,7 @@ internal fun SettingsScreen( customizeColors: () -> Unit, goBack: () -> Unit, ) { - SettingsScaffold(title = stringResource(id = R.string.settings), goBack = goBack) { + SimpleColumnScaffold(title = stringResource(id = R.string.settings), goBack = goBack) { SettingsGroup(title = { SettingsTitleTextComponent(text = stringResource(id = R.string.color_customization)) }) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f894d46..28b175a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ #jetbrains kotlin = "1.9.10" #Simple tools -simple-commons = "80c40375a5" +simple-commons = "31af0c48e0" #Compose composeActivity = "1.8.0" compose = "1.6.0-alpha07"