mirror of
				https://github.com/SimpleMobileTools/Simple-Contacts.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	hide the value only if we have no data yet
This commit is contained in:
		@@ -62,7 +62,7 @@ class FilterContactSourcesAdapter(
 | 
			
		||||
            itemView.apply {
 | 
			
		||||
                filter_contact_source_checkbox.isChecked = isSelected
 | 
			
		||||
                filter_contact_source_checkbox.setColors(activity.getProperTextColor(), activity.getProperPrimaryColor(), activity.getProperBackgroundColor())
 | 
			
		||||
                val countText = if (contactSource.count > 0) " (${contactSource.count})" else ""
 | 
			
		||||
                val countText = if (contactSource.count >= 0) " (${contactSource.count})" else ""
 | 
			
		||||
                val displayName = "${contactSource.publicName}$countText"
 | 
			
		||||
                filter_contact_source_checkbox.text = displayName
 | 
			
		||||
                filter_contact_source_holder.setOnClickListener { viewClicked(!isSelected, contactSource) }
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,11 @@ class FilterContactSourcesDialog(val activity: SimpleActivity, private val callb
 | 
			
		||||
 | 
			
		||||
        val contactSourcesWithCount = ArrayList<ContactSource>()
 | 
			
		||||
        for (contactSource in contactSources) {
 | 
			
		||||
            val count = contacts.filter { it.source == contactSource.name }.count()
 | 
			
		||||
            val count = if (isContactsReady) {
 | 
			
		||||
                contacts.filter { it.source == contactSource.name }.count()
 | 
			
		||||
            } else {
 | 
			
		||||
                -1
 | 
			
		||||
            }
 | 
			
		||||
            contactSourcesWithCount.add(contactSource.copy(count = count))
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user