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 3182edc6..37d66490 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 @@ -248,7 +248,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { } private fun changeColumnCount() { - val items = (CONTACTS_GRID_MIN_COLUMNS_COUNT..CONTACTS_GRID_MAX_COLUMNS_COUNT).map { + val items = (1..CONTACTS_GRID_MAX_COLUMNS_COUNT).map { RadioItem(it, resources.getQuantityString(R.plurals.column_counts, it, it)) } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt index 874912b5..47184631 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/adapters/ContactsAdapter.kt @@ -496,7 +496,7 @@ class ContactsAdapter( val layoutManager = recyclerView.layoutManager if (layoutManager is GridLayoutManager) { val currentSpanCount = layoutManager.spanCount - val newSpanCount = (currentSpanCount - 1).coerceIn(CONTACTS_GRID_MIN_COLUMNS_COUNT, CONTACTS_GRID_MAX_COLUMNS_COUNT) + val newSpanCount = (currentSpanCount - 1).coerceIn(1, CONTACTS_GRID_MAX_COLUMNS_COUNT) layoutManager.spanCount = newSpanCount recyclerView.requestLayout() onColumnCountListener(newSpanCount) @@ -507,7 +507,7 @@ class ContactsAdapter( val layoutManager = recyclerView.layoutManager if (layoutManager is GridLayoutManager) { val currentSpanCount = layoutManager.spanCount - val newSpanCount = (currentSpanCount + 1).coerceIn(CONTACTS_GRID_MIN_COLUMNS_COUNT, CONTACTS_GRID_MAX_COLUMNS_COUNT) + val newSpanCount = (currentSpanCount + 1).coerceIn(1, CONTACTS_GRID_MAX_COLUMNS_COUNT) layoutManager.spanCount = newSpanCount recyclerView.requestLayout() onColumnCountListener(newSpanCount)