Skip to content

Commit 2bb6bec

Browse files
authored
Merge pull request #144 from FunkyMuse/master
refactor: replace divider with our component
2 parents c21635f + 4f85586 commit 2bb6bec

2 files changed

Lines changed: 4 additions & 33 deletions

File tree

app/src/main/kotlin/com/simplemobiletools/thankyou/extensions/Context.kt

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ val Context.config: Config get() = Config.newInstance(applicationContext)
2626
internal fun Activity.startAboutActivity(
2727
appNameId: Int, licenseMask: Long, versionName: String, faqItems: ArrayList<FAQItem>, showFAQBeforeMail: Boolean,
2828
getAppIconIDs: ArrayList<Int> = getAppIconIDs(),
29-
getAppLauncherName : String = launcherName()
29+
getAppLauncherName: String = launcherName()
3030
) {
3131
hideKeyboard()
3232
Intent(applicationContext, AboutActivity::class.java).apply {
@@ -43,18 +43,8 @@ internal fun Activity.startAboutActivity(
4343

4444
internal fun Activity.startCustomizationActivity(
4545
getAppIconIDs: ArrayList<Int> = getAppIconIDs(),
46-
getAppLauncherName : String = launcherName()
46+
getAppLauncherName: String = launcherName()
4747
) {
48-
if (!packageName.contains("slootelibomelpmis".reversed(), true)) {
49-
if (baseConfig.appRunCount > 100) {
50-
val label = "You are using a fake version of the app. For your own safety download the original one from www.simplemobiletools.com. Thanks"
51-
ConfirmationDialog(this, label, positive = R.string.ok, negative = 0) {
52-
launchViewIntent("https://play.google.com/store/apps/dev?id=9070296388022589266")
53-
}
54-
return
55-
}
56-
}
57-
5848
Intent(applicationContext, CustomizationActivity::class.java).apply {
5949
putExtra(APP_ICON_IDS, getAppIconIDs)
6050
putExtra(APP_LAUNCHER_NAME, getAppLauncherName)
@@ -75,22 +65,6 @@ internal fun Activity.launchChangeAppLanguageIntent() {
7565
}
7666
}
7767

78-
internal fun Activity.checkWhatsNew(releases: List<Release>, currVersion: Int) {
79-
if (baseConfig.lastVersion == 0) {
80-
baseConfig.lastVersion = currVersion
81-
return
82-
}
83-
84-
val newReleases = arrayListOf<Release>()
85-
releases.filterTo(newReleases) { it.id > baseConfig.lastVersion }
86-
87-
if (newReleases.isNotEmpty()) {
88-
WhatsNewDialog(this, newReleases)
89-
}
90-
91-
baseConfig.lastVersion = currVersion
92-
}
93-
9468
private fun getAppIconIDs() = arrayListOf(
9569
R.mipmap.ic_launcher_red,
9670
R.mipmap.ic_launcher_pink,

app/src/main/kotlin/com/simplemobiletools/thankyou/screens/SettingsScreen.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import androidx.compose.runtime.Composable
55
import androidx.compose.ui.res.stringResource
66
import com.simplemobiletools.commons.R
77
import com.simplemobiletools.commons.compose.extensions.MyDevices
8-
import com.simplemobiletools.commons.compose.settings.SettingsCheckBoxComponent
9-
import com.simplemobiletools.commons.compose.settings.SettingsGroup
10-
import com.simplemobiletools.commons.compose.settings.SettingsPreferenceComponent
11-
import com.simplemobiletools.commons.compose.settings.SettingsTitleTextComponent
8+
import com.simplemobiletools.commons.compose.settings.*
129
import com.simplemobiletools.commons.compose.settings.scaffold.SettingsScaffold
1310
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
1411
import com.simplemobiletools.commons.compose.theme.SimpleTheme
@@ -36,7 +33,7 @@ internal fun SettingsScreen(
3633
doOnPreferenceClick = customizeColors,
3734
)
3835
}
39-
HorizontalDivider(color = divider_grey)
36+
SettingsHorizontalDivider()
4037
SettingsGroup(title = {
4138
SettingsTitleTextComponent(text = stringResource(id = R.string.general_settings))
4239
}) {

0 commit comments

Comments
 (0)