mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
require Simple Thank You for color customization
This commit is contained in:
@ -56,6 +56,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.32.6'
|
||||
implementation 'com.simplemobiletools:commons:5.32.16'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class DialpadActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
speedDialValues = config.getSpeedDialValues()
|
||||
privateCursor = getMyContactsCursor().loadInBackground()
|
||||
privateCursor = getMyContactsCursor()?.loadInBackground()
|
||||
|
||||
dialpad_0_holder.setOnClickListener { dialpadPressed('0', it) }
|
||||
dialpad_1.setOnClickListener { dialpadPressed('1', it) }
|
||||
|
@ -8,10 +8,7 @@ import android.view.Menu
|
||||
import com.simplemobiletools.commons.activities.ManageBlockedNumbersActivity
|
||||
import com.simplemobiletools.commons.dialogs.ChangeDateTimeFormatDialog
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.baseConfig
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.getFontSizeText
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.dialer.R
|
||||
@ -28,6 +25,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
setupPurchaseThankYou()
|
||||
setupCustomizeColors()
|
||||
setupUseEnglish()
|
||||
setupManageBlockedNumbers()
|
||||
@ -46,9 +44,17 @@ class SettingsActivity : SimpleActivity() {
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
private fun setupPurchaseThankYou() {
|
||||
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
|
||||
settings_purchase_thank_you_holder.setOnClickListener {
|
||||
launchPurchaseThankYouIntent()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupCustomizeColors() {
|
||||
settings_customize_colors_label.text = getCustomizeColorsString()
|
||||
settings_customize_colors_holder.setOnClickListener {
|
||||
startCustomizationActivity()
|
||||
handleCustomizeColorsClick()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ class CallManager {
|
||||
callback(callContact)
|
||||
} else {
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
val privateCursor = context.getMyContactsCursor().loadInBackground()
|
||||
val privateCursor = context.getMyContactsCursor()?.loadInBackground()
|
||||
ensureBackgroundThread {
|
||||
val privateContacts = MyContactsContentProvider.getSimpleContacts(context, privateCursor)
|
||||
val privateContact = privateContacts.firstOrNull { it.doesContainPhoneNumber(callContact.number) }
|
||||
|
@ -15,7 +15,7 @@ class RecentsHelper(private val context: Context) {
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
fun getRecentCalls(callback: (ArrayList<RecentCall>) -> Unit) {
|
||||
val privateCursor = context.getMyContactsCursor().loadInBackground()
|
||||
val privateCursor = context.getMyContactsCursor()?.loadInBackground()
|
||||
ensureBackgroundThread {
|
||||
if (!context.hasPermission(PERMISSION_READ_CALL_LOG)) {
|
||||
callback(ArrayList())
|
||||
|
@ -11,6 +11,27 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_purchase_thank_you_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingLeft="@dimen/normal_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/normal_margin"
|
||||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/settings_purchase_thank_you"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/purchase_simple_thank_you" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_customize_colors_holder"
|
||||
android:layout_width="match_parent"
|
||||
@ -23,7 +44,7 @@
|
||||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/settings_customize_colors"
|
||||
android:id="@+id/settings_customize_colors_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.4.20'
|
||||
ext.kotlin_version = '1.4.21'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
Reference in New Issue
Block a user