Skip to content

Commit 3aa4a8d

Browse files
committed
require Simple Thank You purchase for color customization
1 parent dc4142e commit 3aa4a8d

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ android {
5555
}
5656

5757
dependencies {
58-
implementation 'com.simplemobiletools:commons:5.31.25'
58+
implementation 'com.simplemobiletools:commons:5.32.16'
5959
implementation 'org.greenrobot:eventbus:3.2.0'
6060
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
6161
}

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/SettingsActivity.kt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ package com.simplemobiletools.flashlight.activities
33
import android.content.Intent
44
import android.os.Bundle
55
import android.view.Menu
6-
import com.simplemobiletools.commons.extensions.beVisibleIf
7-
import com.simplemobiletools.commons.extensions.isThankYouInstalled
8-
import com.simplemobiletools.commons.extensions.launchPurchaseThankYouIntent
9-
import com.simplemobiletools.commons.extensions.updateTextColors
6+
import com.simplemobiletools.commons.extensions.*
107
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
118
import com.simplemobiletools.flashlight.R
129
import com.simplemobiletools.flashlight.extensions.config
@@ -40,19 +37,20 @@ class SettingsActivity : SimpleActivity() {
4037
return super.onCreateOptionsMenu(menu)
4138
}
4239

43-
private fun setupCustomizeColors() {
44-
settings_customize_colors_holder.setOnClickListener {
45-
startCustomizationActivity()
46-
}
47-
}
48-
4940
private fun setupPurchaseThankYou() {
50-
settings_purchase_thank_you_holder.beVisibleIf(!isThankYouInstalled())
41+
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
5142
settings_purchase_thank_you_holder.setOnClickListener {
5243
launchPurchaseThankYouIntent()
5344
}
5445
}
5546

47+
private fun setupCustomizeColors() {
48+
settings_customize_colors_label.text = getCustomizeColorsString()
49+
settings_customize_colors_holder.setOnClickListener {
50+
handleCustomizeColorsClick()
51+
}
52+
}
53+
5654
private fun setupCustomizeWidgetColors() {
5755
settings_customize_widget_colors_holder.setOnClickListener {
5856
Intent(this, WidgetTorchConfigureActivity::class.java).apply {

app/src/main/res/layout/activity_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
android:paddingBottom="@dimen/activity_margin">
4545

4646
<com.simplemobiletools.commons.views.MyTextView
47-
android:id="@+id/settings_customize_colors"
47+
android:id="@+id/settings_customize_colors_label"
4848
android:layout_width="wrap_content"
4949
android:layout_height="wrap_content"
5050
android:layout_centerVertical="true"

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.4.10'
4+
ext.kotlin_version = '1.4.21'
55

66
repositories {
77
google()
88
jcenter()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:4.1.0'
12+
classpath 'com.android.tools.build:gradle:4.1.1'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414

1515
// NOTE: Do not place your application dependencies here; they belong

0 commit comments

Comments
 (0)