Merge pull request #144 from FunkyMuse/master

refactor: replace divider with our component
This commit is contained in:
Tibor Kaputa 2023-10-06 16:41:18 +02:00 committed by GitHub
commit 2bb6bec073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 33 deletions

View File

@ -45,16 +45,6 @@ internal fun Activity.startCustomizationActivity(
getAppIconIDs: ArrayList<Int> = getAppIconIDs(), getAppIconIDs: ArrayList<Int> = getAppIconIDs(),
getAppLauncherName: String = launcherName() getAppLauncherName: String = launcherName()
) { ) {
if (!packageName.contains("slootelibomelpmis".reversed(), true)) {
if (baseConfig.appRunCount > 100) {
val label = "You are using a fake version of the app. For your own safety download the original one from www.simplemobiletools.com. Thanks"
ConfirmationDialog(this, label, positive = R.string.ok, negative = 0) {
launchViewIntent("https://play.google.com/store/apps/dev?id=9070296388022589266")
}
return
}
}
Intent(applicationContext, CustomizationActivity::class.java).apply { Intent(applicationContext, CustomizationActivity::class.java).apply {
putExtra(APP_ICON_IDS, getAppIconIDs) putExtra(APP_ICON_IDS, getAppIconIDs)
putExtra(APP_LAUNCHER_NAME, getAppLauncherName) putExtra(APP_LAUNCHER_NAME, getAppLauncherName)
@ -75,22 +65,6 @@ internal fun Activity.launchChangeAppLanguageIntent() {
} }
} }
internal fun Activity.checkWhatsNew(releases: List<Release>, currVersion: Int) {
if (baseConfig.lastVersion == 0) {
baseConfig.lastVersion = currVersion
return
}
val newReleases = arrayListOf<Release>()
releases.filterTo(newReleases) { it.id > baseConfig.lastVersion }
if (newReleases.isNotEmpty()) {
WhatsNewDialog(this, newReleases)
}
baseConfig.lastVersion = currVersion
}
private fun getAppIconIDs() = arrayListOf( private fun getAppIconIDs() = arrayListOf(
R.mipmap.ic_launcher_red, R.mipmap.ic_launcher_red,
R.mipmap.ic_launcher_pink, R.mipmap.ic_launcher_pink,

View File

@ -5,10 +5,7 @@ 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
import com.simplemobiletools.commons.compose.extensions.MyDevices import com.simplemobiletools.commons.compose.extensions.MyDevices
import com.simplemobiletools.commons.compose.settings.SettingsCheckBoxComponent import com.simplemobiletools.commons.compose.settings.*
import com.simplemobiletools.commons.compose.settings.SettingsGroup
import com.simplemobiletools.commons.compose.settings.SettingsPreferenceComponent
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.SimpleTheme
@ -36,7 +33,7 @@ internal fun SettingsScreen(
doOnPreferenceClick = customizeColors, doOnPreferenceClick = customizeColors,
) )
} }
HorizontalDivider(color = divider_grey) SettingsHorizontalDivider()
SettingsGroup(title = { SettingsGroup(title = {
SettingsTitleTextComponent(text = stringResource(id = R.string.general_settings)) SettingsTitleTextComponent(text = stringResource(id = R.string.general_settings))
}) { }) {