diff --git a/app/src/main/java/com/etesync/syncadapter/ui/CollectionMembersActivity.kt b/app/src/main/java/com/etesync/syncadapter/ui/CollectionMembersActivity.kt index 261fc51d..579666a0 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/CollectionMembersActivity.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/CollectionMembersActivity.kt @@ -14,6 +14,7 @@ import com.etesync.syncadapter.R import com.etesync.syncadapter.model.CollectionInfo import com.etesync.syncadapter.model.JournalEntity import com.etesync.syncadapter.resource.LocalCalendar +import com.etesync.syncadapter.resource.LocalTaskList class CollectionMembersActivity : BaseActivity(), Refreshable { @@ -36,10 +37,16 @@ class CollectionMembersActivity : BaseActivity(), Refreshable { setTitle(R.string.collection_members_title) val colorSquare = findViewById(R.id.color) - if (info.type == CollectionInfo.Type.CALENDAR) { - colorSquare.setBackgroundColor(info.color ?: LocalCalendar.defaultColor) - } else { - colorSquare.visibility = View.GONE + when (info.type) { + CollectionInfo.Type.CALENDAR -> { + colorSquare.setBackgroundColor(info.color ?: LocalCalendar.defaultColor) + } + CollectionInfo.Type.TASKS -> { + colorSquare.setBackgroundColor(info.color ?: LocalTaskList.defaultColor) + } + CollectionInfo.Type.ADDRESS_BOOK -> { + colorSquare.visibility = View.GONE + } } findViewById(R.id.progressBar).visibility = View.GONE