From cb639fabebff19c3c29e376691c60e50ec977f5c Mon Sep 17 00:00:00 2001 From: ismailnurudeen Date: Fri, 24 Feb 2023 11:45:21 +0100 Subject: [PATCH] fix: undo unnecessary formatting changes. --- .../pro/activities/EditContactActivity.kt | 31 +++++-------------- .../pro/adapters/SelectContactsAdapter.kt | 8 ++--- .../pro/dialogs/ExportContactsDialog.kt | 4 +-- .../contacts/pro/extensions/Context.kt | 3 +- 4 files changed, 11 insertions(+), 35 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt index 34318028..10c475fd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt @@ -219,25 +219,15 @@ class EditContactActivity : ContactActivity() { val properPrimaryColor = getProperPrimaryColor() arrayOf( - contact_numbers_add_new, - contact_emails_add_new, - contact_addresses_add_new, - contact_ims_add_new, - contact_events_add_new, - contact_websites_add_new, - contact_groups_add_new + contact_numbers_add_new, contact_emails_add_new, contact_addresses_add_new, contact_ims_add_new, contact_events_add_new, + contact_websites_add_new, contact_groups_add_new ).forEach { it.applyColorFilter(properPrimaryColor) } arrayOf( - contact_numbers_add_new.background, - contact_emails_add_new.background, - contact_addresses_add_new.background, - contact_ims_add_new.background, - contact_events_add_new.background, - contact_websites_add_new.background, - contact_groups_add_new.background + contact_numbers_add_new.background, contact_emails_add_new.background, contact_addresses_add_new.background, contact_ims_add_new.background, + contact_events_add_new.background, contact_websites_add_new.background, contact_groups_add_new.background ).forEach { it.applyColorFilter(textColor) } @@ -609,18 +599,11 @@ class EditContactActivity : ContactActivity() { startActivityForResult(ringtonePickerIntent, INTENT_SELECT_RINGTONE) } catch (e: Exception) { val currentRingtone = contact!!.ringtone ?: getDefaultAlarmSound(RingtoneManager.TYPE_RINGTONE).uri - SelectAlarmSoundDialog( - this, - currentRingtone, - AudioManager.STREAM_RING, - PICK_RINGTONE_INTENT_ID, - RingtoneManager.TYPE_RINGTONE, - true, + SelectAlarmSoundDialog(this, currentRingtone, AudioManager.STREAM_RING, PICK_RINGTONE_INTENT_ID, RingtoneManager.TYPE_RINGTONE, true, onAlarmPicked = { contact!!.ringtone = it?.uri contact_ringtone.text = it?.title - }, - onAlarmSoundDeleted = {} + }, onAlarmSoundDeleted = {} ) } } @@ -1084,7 +1067,7 @@ class EditContactActivity : ContactActivity() { events = filledEvents, starred = if (isContactStarred()) 1 else 0, notes = contact_notes.value, - websites = filledWebsites + websites = filledWebsites, ) val company = contact_organization_company.value diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SelectContactsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SelectContactsAdapter.kt index 5d2841ae..d7e64b07 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SelectContactsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/SelectContactsAdapter.kt @@ -20,12 +20,8 @@ import com.simplemobiletools.contacts.pro.extensions.config import kotlinx.android.synthetic.main.item_add_favorite_with_number.view.* class SelectContactsAdapter( - val activity: SimpleActivity, - var contacts: ArrayList, - private val selectedContacts: ArrayList, - private val allowPickMultiple: Boolean, - recyclerView: MyRecyclerView, - private val itemClick: ((Contact) -> Unit)? = null + val activity: SimpleActivity, var contacts: ArrayList, private val selectedContacts: ArrayList, private val allowPickMultiple: Boolean, + recyclerView: MyRecyclerView, private val itemClick: ((Contact) -> Unit)? = null ) : RecyclerView.Adapter() { private val itemViews = SparseArray() diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ExportContactsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ExportContactsDialog.kt index 31370967..fdbab186 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ExportContactsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/dialogs/ExportContactsDialog.kt @@ -16,9 +16,7 @@ import kotlinx.android.synthetic.main.dialog_export_contacts.view.* import java.io.File class ExportContactsDialog( - val activity: SimpleActivity, - val path: String, - val hidePath: Boolean, + val activity: SimpleActivity, val path: String, val hidePath: Boolean, private val callback: (file: File, ignoredContactSources: HashSet) -> Unit ) { private var ignoreClicks = false diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt index b08a7912..b4f18f1a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt @@ -26,7 +26,6 @@ fun Context.getPackageDrawable(packageName: String): Drawable { WHATSAPP_PACKAGE -> R.drawable.ic_whatsapp_rect_vector VIBER_PACKAGE -> R.drawable.ic_viber_rect_vector else -> R.drawable.ic_threema_rect_vector - }, - theme + }, theme ) }