mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
update commons to 3.18.9
This commit is contained in:
@ -90,7 +90,6 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
||||
ON_CLICK_EDIT_CONTACT -> editContact(it as Contact)
|
||||
}
|
||||
}.apply {
|
||||
setupDragListener(true)
|
||||
addVerticalDividers(true)
|
||||
group_contacts_list.adapter = this
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||
private var isSearchOpen = false
|
||||
private var searchMenuItem: MenuItem? = null
|
||||
|
||||
private var storedUseEnglish = false
|
||||
private var storedTextColor = 0
|
||||
private var storedBackgroundColor = 0
|
||||
private var storedPrimaryColor = 0
|
||||
@ -79,13 +78,8 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (storedUseEnglish != config.useEnglish) {
|
||||
restartActivity()
|
||||
return
|
||||
}
|
||||
|
||||
if (storedShowPhoneNumbers != config.showPhoneNumbers) {
|
||||
restartActivity()
|
||||
System.exit(0)
|
||||
return
|
||||
}
|
||||
|
||||
@ -179,7 +173,6 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||
|
||||
private fun storeStateVariables() {
|
||||
config.apply {
|
||||
storedUseEnglish = useEnglish
|
||||
storedTextColor = textColor
|
||||
storedBackgroundColor = backgroundColor
|
||||
storedPrimaryColor = primaryColor
|
||||
|
@ -4,7 +4,6 @@ import android.os.Bundle
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.extensions.useEnglishToggled
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.contacts.R
|
||||
import com.simplemobiletools.contacts.extensions.config
|
||||
@ -46,7 +45,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
settings_use_english_holder.setOnClickListener {
|
||||
settings_use_english.toggle()
|
||||
config.useEnglish = settings_use_english.isChecked
|
||||
useEnglishToggled()
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,7 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
||||
private var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt()
|
||||
|
||||
init {
|
||||
setupDragListener(true)
|
||||
initDrawables()
|
||||
showContactThumbnails = config.showContactThumbnails
|
||||
showPhoneNumbers = config.showPhoneNumbers
|
||||
|
@ -24,11 +24,14 @@ import java.util.*
|
||||
class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val refreshListener: RefreshContactsListener?, recyclerView: MyRecyclerView,
|
||||
fastScroller: FastScroller, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) {
|
||||
|
||||
private var config = activity.config
|
||||
private var smallPadding = activity.resources.getDimension(R.dimen.small_margin).toInt()
|
||||
private var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt()
|
||||
|
||||
var showContactThumbnails = config.showContactThumbnails
|
||||
var showContactThumbnails = activity.config.showContactThumbnails
|
||||
|
||||
init {
|
||||
setupDragListener(true)
|
||||
}
|
||||
|
||||
override fun getActionMenuId() = R.menu.cab_groups
|
||||
|
||||
|
@ -149,7 +149,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
||||
activity!!.startActivity(this)
|
||||
}
|
||||
}.apply {
|
||||
setupDragListener(true)
|
||||
addVerticalDividers(true)
|
||||
fragment_list.adapter = this
|
||||
}
|
||||
@ -190,7 +189,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
||||
ON_CLICK_EDIT_CONTACT -> context!!.editContact(it as Contact)
|
||||
}
|
||||
}.apply {
|
||||
setupDragListener(true)
|
||||
addVerticalDividers(true)
|
||||
fragment_list.adapter = this
|
||||
}
|
||||
|
Reference in New Issue
Block a user