From a1051856ecc0b31c2e59ea72d8e8c6fca67024e3 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 29 Jan 2019 23:10:07 +0000 Subject: [PATCH] Fix usage of tasklist colour in collection members activity. --- .../syncadapter/ui/CollectionMembersActivity.kt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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