mirror of
https://github.com/SimpleMobileTools/Simple-Thank-You.git
synced 2025-06-05 22:09:28 +02:00
Merge pull request #140 from FunkyMuse/master
refactor: migrate dialogs to Compose
This commit is contained in:
@@ -4,18 +4,24 @@ import android.content.Intent
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.*
|
||||||
import com.simplemobiletools.commons.compose.extensions.enableEdgeToEdgeSimple
|
import androidx.compose.runtime.snapshots.SnapshotStateList
|
||||||
import com.simplemobiletools.commons.compose.extensions.onEventValue
|
import com.simplemobiletools.commons.compose.alert_dialog.AlertDialogState
|
||||||
|
import com.simplemobiletools.commons.compose.alert_dialog.rememberAlertDialogState
|
||||||
|
import com.simplemobiletools.commons.compose.extensions.*
|
||||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.dialogs.DonateAlertDialog
|
||||||
|
import com.simplemobiletools.commons.dialogs.RateStarsAlertDialog
|
||||||
|
import com.simplemobiletools.commons.dialogs.WhatsNewAlertDialog
|
||||||
|
import com.simplemobiletools.commons.extensions.hideKeyboard
|
||||||
|
import com.simplemobiletools.commons.extensions.launchMoreAppsFromUsIntent
|
||||||
import com.simplemobiletools.commons.models.FAQItem
|
import com.simplemobiletools.commons.models.FAQItem
|
||||||
import com.simplemobiletools.commons.models.Release
|
import com.simplemobiletools.commons.models.Release
|
||||||
import com.simplemobiletools.thankyou.BuildConfig
|
import com.simplemobiletools.thankyou.BuildConfig
|
||||||
import com.simplemobiletools.thankyou.R
|
import com.simplemobiletools.thankyou.R
|
||||||
import com.simplemobiletools.thankyou.extensions.checkWhatsNew
|
|
||||||
import com.simplemobiletools.thankyou.extensions.startAboutActivity
|
import com.simplemobiletools.thankyou.extensions.startAboutActivity
|
||||||
import com.simplemobiletools.thankyou.screens.MainScreen
|
import com.simplemobiletools.thankyou.screens.MainScreen
|
||||||
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
|
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@@ -23,6 +29,8 @@ class MainActivity : ComponentActivity() {
|
|||||||
enableEdgeToEdgeSimple()
|
enableEdgeToEdgeSimple()
|
||||||
setContent {
|
setContent {
|
||||||
AppThemeSurface {
|
AppThemeSurface {
|
||||||
|
val releasesList = remember { mutableStateListOf<Release>() }
|
||||||
|
val checkWhatsNewAlertDialogState = getCheckWhatsNewAlertDialogState(releasesList)
|
||||||
val linkColor = linkColor()
|
val linkColor = linkColor()
|
||||||
val showMoreApps = onEventValue { !resources.getBoolean(R.bool.hide_google_relations) }
|
val showMoreApps = onEventValue { !resources.getBoolean(R.bool.hide_google_relations) }
|
||||||
MainScreen(
|
MainScreen(
|
||||||
@@ -32,17 +40,69 @@ class MainActivity : ComponentActivity() {
|
|||||||
openAbout = ::launchAbout,
|
openAbout = ::launchAbout,
|
||||||
moreAppsFromUs = ::launchMoreAppsFromUsIntent
|
moreAppsFromUs = ::launchMoreAppsFromUsIntent
|
||||||
)
|
)
|
||||||
|
AppLaunched()
|
||||||
|
CheckWhatsNew(releasesList, checkWhatsNewAlertDialogState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
appLaunched(BuildConfig.APPLICATION_ID)
|
|
||||||
checkWhatsNewDialog()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun linkColor() = onEventValue {
|
private fun AppLaunched(
|
||||||
when {
|
donateAlertDialogState: AlertDialogState = getDonateAlertDialogState(),
|
||||||
isWhiteTheme() || isBlackAndWhiteTheme() -> baseConfig.accentColor
|
rateStarsAlertDialogState: AlertDialogState = getRateStarsAlertDialogState(),
|
||||||
else -> getProperPrimaryColor()
|
) {
|
||||||
|
LaunchedEffect(Unit) {
|
||||||
|
appLaunchedCompose(
|
||||||
|
appId = BuildConfig.APPLICATION_ID,
|
||||||
|
showDonateDialog = donateAlertDialogState::show,
|
||||||
|
showRateUsDialog = rateStarsAlertDialogState::show,
|
||||||
|
showUpgradeDialog = {}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun CheckWhatsNew(
|
||||||
|
releasesList: SnapshotStateList<Release>,
|
||||||
|
checkWhatsNewAlertDialogState: AlertDialogState
|
||||||
|
) {
|
||||||
|
DisposableEffect(Unit) {
|
||||||
|
checkWhatsNewCompose(
|
||||||
|
releases = listOf(
|
||||||
|
Release(14, R.string.release_14),
|
||||||
|
Release(3, R.string.release_3)
|
||||||
|
),
|
||||||
|
currVersion = BuildConfig.VERSION_CODE,
|
||||||
|
showWhatsNewDialog = { releases ->
|
||||||
|
releasesList.addAll(releases)
|
||||||
|
checkWhatsNewAlertDialogState.show()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
onDispose {
|
||||||
|
releasesList.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun getCheckWhatsNewAlertDialogState(releasesList: SnapshotStateList<Release>) = rememberAlertDialogState().apply {
|
||||||
|
DialogMember {
|
||||||
|
WhatsNewAlertDialog(alertDialogState = this, releases = releasesList.toImmutableList())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun getDonateAlertDialogState() =
|
||||||
|
rememberAlertDialogState().apply {
|
||||||
|
DialogMember {
|
||||||
|
DonateAlertDialog(alertDialogState = this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun getRateStarsAlertDialogState() = rememberAlertDialogState().apply {
|
||||||
|
DialogMember {
|
||||||
|
RateStarsAlertDialog(alertDialogState = this, onRating = ::rateStarsRedirectAndThankYou)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,12 +121,4 @@ class MainActivity : ComponentActivity() {
|
|||||||
|
|
||||||
startAboutActivity(R.string.app_name, 0, BuildConfig.VERSION_NAME, faqItems, false)
|
startAboutActivity(R.string.app_name, 0, BuildConfig.VERSION_NAME, faqItems, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkWhatsNewDialog() {
|
|
||||||
arrayListOf<Release>().apply {
|
|
||||||
add(Release(14, R.string.release_14))
|
|
||||||
add(Release(3, R.string.release_3))
|
|
||||||
checkWhatsNew(this, BuildConfig.VERSION_CODE)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -4,21 +4,12 @@ import android.annotation.SuppressLint
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.material3.AlertDialog
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Text
|
|
||||||
import androidx.compose.material3.TextButton
|
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Modifier
|
|
||||||
import androidx.compose.ui.res.stringResource
|
|
||||||
import androidx.compose.ui.window.DialogProperties
|
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
import com.simplemobiletools.commons.compose.alert_dialog.AlertDialogState
|
|
||||||
import com.simplemobiletools.commons.compose.alert_dialog.rememberAlertDialogState
|
import com.simplemobiletools.commons.compose.alert_dialog.rememberAlertDialogState
|
||||||
import com.simplemobiletools.commons.compose.extensions.enableEdgeToEdgeSimple
|
import com.simplemobiletools.commons.compose.extensions.enableEdgeToEdgeSimple
|
||||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||||
import com.simplemobiletools.commons.compose.theme.Shapes
|
import com.simplemobiletools.commons.dialogs.ConfirmationAdvancedAlertDialog
|
||||||
import com.simplemobiletools.commons.extensions.getAppIconColors
|
import com.simplemobiletools.commons.extensions.getAppIconColors
|
||||||
import com.simplemobiletools.commons.extensions.toggleAppIconColor
|
import com.simplemobiletools.commons.extensions.toggleAppIconColor
|
||||||
import com.simplemobiletools.commons.helpers.isTiramisuPlus
|
import com.simplemobiletools.commons.helpers.isTiramisuPlus
|
||||||
@@ -50,8 +41,7 @@ class SettingsActivity : ComponentActivity() {
|
|||||||
(wasUseEnglishToggledFlow || Locale.getDefault().language != "en") && !isTiramisuPlus()
|
(wasUseEnglishToggledFlow || Locale.getDefault().language != "en") && !isTiramisuPlus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val alertDialogState = rememberAlertDialogState()
|
val confirmHideIconAlertDialogState = getConfirmHideIconAlertDialogState()
|
||||||
ConfirmationHideLauncherDialog(alertDialogState)
|
|
||||||
|
|
||||||
SettingsScreen(
|
SettingsScreen(
|
||||||
displayLanguage = displayLanguage,
|
displayLanguage = displayLanguage,
|
||||||
@@ -65,7 +55,7 @@ class SettingsActivity : ComponentActivity() {
|
|||||||
isHidingLauncherIcon = hideLauncherIconFlow,
|
isHidingLauncherIcon = hideLauncherIconFlow,
|
||||||
hideLauncherIconClick = { isChecked ->
|
hideLauncherIconClick = { isChecked ->
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
alertDialogState.show()
|
confirmHideIconAlertDialogState.show()
|
||||||
} else {
|
} else {
|
||||||
toggleHideLauncherIcon()
|
toggleHideLauncherIcon()
|
||||||
preferences.hideLauncherIcon = false
|
preferences.hideLauncherIcon = false
|
||||||
@@ -79,37 +69,20 @@ class SettingsActivity : ComponentActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun ConfirmationHideLauncherDialog(alertDialogState: AlertDialogState) {
|
private fun getConfirmHideIconAlertDialogState() =
|
||||||
alertDialogState.DialogMember {
|
rememberAlertDialogState().apply {
|
||||||
AlertDialog(
|
DialogMember {
|
||||||
modifier = Modifier.fillMaxWidth(0.9f),
|
ConfirmationAdvancedAlertDialog(
|
||||||
properties = DialogProperties(usePlatformDefaultWidth = false),
|
alertDialogState = this,
|
||||||
onDismissRequest = alertDialogState::hide,
|
messageId = R.string.hide_launcher_icon_explanation,
|
||||||
confirmButton = {
|
positive = R.string.ok,
|
||||||
TextButton(onClick = {
|
negative = R.string.cancel
|
||||||
alertDialogState.hide()
|
) { hideIcon ->
|
||||||
preferences.hideLauncherIcon = true
|
preferences.hideLauncherIcon = hideIcon
|
||||||
|
if (hideIcon) {
|
||||||
toggleHideLauncherIcon()
|
toggleHideLauncherIcon()
|
||||||
}) {
|
|
||||||
Text(text = stringResource(id = R.string.ok))
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
dismissButton = {
|
|
||||||
TextButton(onClick = {
|
|
||||||
alertDialogState.hide()
|
|
||||||
preferences.hideLauncherIcon = false
|
|
||||||
}) {
|
|
||||||
Text(text = stringResource(id = R.string.cancel))
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
shape = Shapes.large,
|
|
||||||
text = {
|
|
||||||
Text(
|
|
||||||
text = stringResource(id = R.string.hide_launcher_icon_explanation),
|
|
||||||
color = MaterialTheme.colorScheme.onSurface
|
|
||||||
)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,9 +8,7 @@ import android.os.Build
|
|||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import com.simplemobiletools.commons.activities.AboutActivity
|
import com.simplemobiletools.commons.activities.AboutActivity
|
||||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
|
||||||
import com.simplemobiletools.commons.activities.CustomizationActivity
|
import com.simplemobiletools.commons.activities.CustomizationActivity
|
||||||
import com.simplemobiletools.commons.compose.theme.getAppLauncherName
|
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.WhatsNewDialog
|
import com.simplemobiletools.commons.dialogs.WhatsNewDialog
|
||||||
import com.simplemobiletools.commons.extensions.baseConfig
|
import com.simplemobiletools.commons.extensions.baseConfig
|
||||||
|
@@ -1,13 +1,12 @@
|
|||||||
package com.simplemobiletools.thankyou.helpers
|
package com.simplemobiletools.thankyou.helpers
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import com.simplemobiletools.commons.extensions.sharedPreferencesCallback
|
|
||||||
import com.simplemobiletools.commons.helpers.BaseConfig
|
import com.simplemobiletools.commons.helpers.BaseConfig
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.filterNotNull
|
|
||||||
|
|
||||||
class Config(context: Context) : BaseConfig(context) {
|
class Config(context: Context) : BaseConfig(context) {
|
||||||
companion object {
|
companion object {
|
||||||
|
const val HIDE_LAUNCHER_ICON = "hide_launcher_icon"
|
||||||
fun newInstance(context: Context) = Config(context)
|
fun newInstance(context: Context) = Config(context)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
get() = prefs.getBoolean(HIDE_LAUNCHER_ICON, false)
|
get() = prefs.getBoolean(HIDE_LAUNCHER_ICON, false)
|
||||||
set(hideLauncherIcon) = prefs.edit().putBoolean(HIDE_LAUNCHER_ICON, hideLauncherIcon).apply()
|
set(hideLauncherIcon) = prefs.edit().putBoolean(HIDE_LAUNCHER_ICON, hideLauncherIcon).apply()
|
||||||
|
|
||||||
val hideLauncherIconFlow: Flow<Boolean> = prefs.run { sharedPreferencesCallback { hideLauncherIcon } }.filterNotNull()
|
val hideLauncherIconFlow: Flow<Boolean> = ::hideLauncherIcon.asFlowNonNull()
|
||||||
val wasUseEnglishToggledFlow: Flow<Boolean> = prefs.run { sharedPreferencesCallback { wasUseEnglishToggled } }.filterNotNull()
|
val wasUseEnglishToggledFlow: Flow<Boolean> = ::wasUseEnglishToggled.asFlowNonNull()
|
||||||
val useEnglishFlow: Flow<Boolean> = prefs.run { sharedPreferencesCallback { useEnglish } }.filterNotNull()
|
val useEnglishFlow: Flow<Boolean> = ::useEnglish.asFlowNonNull()
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
package com.simplemobiletools.thankyou.helpers
|
|
||||||
|
|
||||||
// Shared Preferences
|
|
||||||
const val HIDE_LAUNCHER_ICON = "hide_launcher_icon"
|
|
@@ -25,6 +25,7 @@ import com.simplemobiletools.commons.compose.menus.ActionMenu
|
|||||||
import com.simplemobiletools.commons.compose.menus.OverflowMode
|
import com.simplemobiletools.commons.compose.menus.OverflowMode
|
||||||
import com.simplemobiletools.commons.compose.settings.scaffold.*
|
import com.simplemobiletools.commons.compose.settings.scaffold.*
|
||||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
||||||
|
import com.simplemobiletools.commons.compose.theme.SimpleTheme
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -33,24 +34,13 @@ internal fun MainScreen(
|
|||||||
openSettings: () -> Unit,
|
openSettings: () -> Unit,
|
||||||
openAbout: () -> Unit,
|
openAbout: () -> Unit,
|
||||||
moreAppsFromUs: () -> Unit,
|
moreAppsFromUs: () -> Unit,
|
||||||
linkColor: Int,
|
linkColor: Color,
|
||||||
) {
|
) {
|
||||||
SettingsLazyScaffold(customTopBar = { scrolledColor: Color, _: MutableInteractionSource, scrollBehavior: TopAppBarScrollBehavior, statusBarColor: Int, colorTransitionFraction: Float, contrastColor: Color ->
|
SettingsLazyScaffold(customTopBar = { scrolledColor: Color, _: MutableInteractionSource, scrollBehavior: TopAppBarScrollBehavior, statusBarColor: Int, colorTransitionFraction: Float, contrastColor: Color ->
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = {},
|
title = {},
|
||||||
actions = {
|
actions = {
|
||||||
val actionMenus = remember {
|
val actionMenus = rememberActionItems(openSettings, openAbout, showMoreApps, moreAppsFromUs)
|
||||||
val settings =
|
|
||||||
ActionItem(R.string.settings, icon = Icons.Filled.Settings, doAction = openSettings, overflowMode = OverflowMode.NEVER_OVERFLOW)
|
|
||||||
val about = ActionItem(R.string.about, icon = Icons.Outlined.Info, doAction = openAbout, overflowMode = OverflowMode.NEVER_OVERFLOW)
|
|
||||||
|
|
||||||
val list = if (showMoreApps) {
|
|
||||||
listOf(settings, about, ActionItem(R.string.more_apps_from_us, doAction = moreAppsFromUs, overflowMode = OverflowMode.ALWAYS_OVERFLOW))
|
|
||||||
} else {
|
|
||||||
listOf(settings, about)
|
|
||||||
}
|
|
||||||
list.toImmutableList()
|
|
||||||
}
|
|
||||||
var isMenuVisible by remember { mutableStateOf(false) }
|
var isMenuVisible by remember { mutableStateOf(false) }
|
||||||
ActionMenu(items = actionMenus, numIcons = 2, isMenuVisible = isMenuVisible, onMenuToggle = { isMenuVisible = it }, iconsColor = scrolledColor)
|
ActionMenu(items = actionMenus, numIcons = 2, isMenuVisible = isMenuVisible, onMenuToggle = { isMenuVisible = it }, iconsColor = scrolledColor)
|
||||||
},
|
},
|
||||||
@@ -60,7 +50,7 @@ internal fun MainScreen(
|
|||||||
windowInsets = topAppBarInsets()
|
windowInsets = topAppBarInsets()
|
||||||
)
|
)
|
||||||
}) { paddingValues ->
|
}) { paddingValues ->
|
||||||
val textColor = MaterialTheme.colorScheme.onSurface.toArgb()
|
val textColor = SimpleTheme.colorScheme.onSurface.toArgb()
|
||||||
|
|
||||||
AndroidView(
|
AndroidView(
|
||||||
factory = { context ->
|
factory = { context ->
|
||||||
@@ -77,17 +67,36 @@ internal fun MainScreen(
|
|||||||
.padding(bottom = paddingValues.calculateBottomPadding())
|
.padding(bottom = paddingValues.calculateBottomPadding())
|
||||||
.padding(40.dp),
|
.padding(40.dp),
|
||||||
update = { textView ->
|
update = { textView ->
|
||||||
textView.setLinkTextColor(linkColor)
|
textView.setLinkTextColor(linkColor.toArgb())
|
||||||
textView.setTextColor(textColor)
|
textView.setTextColor(textColor)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun rememberActionItems(
|
||||||
|
openSettings: () -> Unit,
|
||||||
|
openAbout: () -> Unit,
|
||||||
|
showMoreApps: Boolean,
|
||||||
|
moreAppsFromUs: () -> Unit
|
||||||
|
) = remember {
|
||||||
|
val settings =
|
||||||
|
ActionItem(R.string.settings, icon = Icons.Filled.Settings, doAction = openSettings, overflowMode = OverflowMode.NEVER_OVERFLOW)
|
||||||
|
val about = ActionItem(R.string.about, icon = Icons.Outlined.Info, doAction = openAbout, overflowMode = OverflowMode.NEVER_OVERFLOW)
|
||||||
|
|
||||||
|
val list = if (showMoreApps) {
|
||||||
|
listOf(settings, about, ActionItem(R.string.more_apps_from_us, doAction = moreAppsFromUs, overflowMode = OverflowMode.ALWAYS_OVERFLOW))
|
||||||
|
} else {
|
||||||
|
listOf(settings, about)
|
||||||
|
}
|
||||||
|
list.toImmutableList()
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@MyDevices
|
@MyDevices
|
||||||
private fun MainScreenPreview() {
|
private fun MainScreenPreview() {
|
||||||
AppThemeSurface {
|
AppThemeSurface {
|
||||||
MainScreen(showMoreApps = true, openSettings = {}, openAbout = {}, moreAppsFromUs = {}, linkColor = MaterialTheme.colorScheme.onSurface.toArgb())
|
MainScreen(showMoreApps = true, openSettings = {}, openAbout = {}, moreAppsFromUs = {}, linkColor = SimpleTheme.colorScheme.onSurface)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
package com.simplemobiletools.thankyou.screens
|
package com.simplemobiletools.thankyou.screens
|
||||||
|
|
||||||
import androidx.compose.material3.HorizontalDivider
|
import androidx.compose.material3.HorizontalDivider
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import com.simplemobiletools.commons.R
|
import com.simplemobiletools.commons.R
|
||||||
@@ -12,6 +11,7 @@ import com.simplemobiletools.commons.compose.settings.SettingsPreferenceComponen
|
|||||||
import com.simplemobiletools.commons.compose.settings.SettingsTitleTextComponent
|
import com.simplemobiletools.commons.compose.settings.SettingsTitleTextComponent
|
||||||
import com.simplemobiletools.commons.compose.settings.scaffold.SettingsScaffold
|
import com.simplemobiletools.commons.compose.settings.scaffold.SettingsScaffold
|
||||||
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
|
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.compose.theme.divider_grey
|
||||||
import com.simplemobiletools.commons.helpers.isTiramisuPlus
|
import com.simplemobiletools.commons.helpers.isTiramisuPlus
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ internal fun SettingsScreen(
|
|||||||
label = stringResource(id = R.string.language),
|
label = stringResource(id = R.string.language),
|
||||||
value = displayLanguage,
|
value = displayLanguage,
|
||||||
doOnPreferenceClick = onSetupLanguagePress,
|
doOnPreferenceClick = onSetupLanguagePress,
|
||||||
preferenceLabelColor = MaterialTheme.colorScheme.onSurface,
|
preferenceLabelColor = SimpleTheme.colorScheme.onSurface,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
SettingsCheckBoxComponent(
|
SettingsCheckBoxComponent(
|
||||||
|
@@ -2,18 +2,18 @@
|
|||||||
#jetbrains
|
#jetbrains
|
||||||
kotlin = "1.9.10"
|
kotlin = "1.9.10"
|
||||||
#Simple tools
|
#Simple tools
|
||||||
simple-commons = "b7dd6ad428"
|
simple-commons = "b72ded2a75"
|
||||||
#Compose
|
#Compose
|
||||||
composeActivity = "1.8.0-beta01"
|
composeActivity = "1.8.0-rc01"
|
||||||
compose = "1.6.0-alpha05"
|
compose = "1.6.0-alpha06"
|
||||||
composeCompiler = "1.5.3"
|
composeCompiler = "1.5.3"
|
||||||
composeMaterial3 = "1.2.0-alpha07"
|
composeMaterial3 = "1.2.0-alpha08"
|
||||||
#Androidx
|
#Androidx
|
||||||
androidx-customView = "1.2.0-alpha02"
|
androidx-customView = "1.2.0-alpha02"
|
||||||
androidx-customViewPooling = "1.0.0"
|
androidx-customViewPooling = "1.0.0"
|
||||||
androidx-lifecycle = "2.7.0-alpha02"
|
androidx-lifecycle = "2.7.0-alpha02"
|
||||||
#Gradle
|
#Gradle
|
||||||
gradlePlugins-agp = "8.1.1"
|
gradlePlugins-agp = "8.1.2"
|
||||||
app-build-compileSDKVersion = "34"
|
app-build-compileSDKVersion = "34"
|
||||||
app-build-targetSDK = "34"
|
app-build-targetSDK = "34"
|
||||||
app-build-minimumSDK = "23"
|
app-build-minimumSDK = "23"
|
||||||
|
Reference in New Issue
Block a user