diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt index 48209c17..5a3d6086 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt @@ -417,14 +417,14 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { tabsList.forEachIndexed { index, value -> if (config.showTabs and value != 0) { binding.mainTabsHolder.newTab().setCustomView(com.simplemobiletools.commons.R.layout.bottom_tablayout_item).apply tab@{ - customView - ?.let { BottomTablayoutItemBinding.bind(it) } - ?.apply { - tabItemIcon.setImageDrawable(getTabIcon(index)) - tabItemLabel.text = getTabLabel(index) - AutofitHelper.create(tabItemLabel) - binding.mainTabsHolder.addTab(this@tab) - } + customView?.let { + BottomTablayoutItemBinding.bind(it) + }?.apply { + tabItemIcon.setImageDrawable(getTabIcon(index)) + tabItemLabel.text = getTabLabel(index) + AutofitHelper.create(tabItemLabel) + binding.mainTabsHolder.addTab(this@tab) + } } } }