diff --git a/app/src/main/java/ch/dissem/apps/abit/MainActivity.kt b/app/src/main/java/ch/dissem/apps/abit/MainActivity.kt index 435d954..7277e88 100644 --- a/app/src/main/java/ch/dissem/apps/abit/MainActivity.kt +++ b/app/src/main/java/ch/dissem/apps/abit/MainActivity.kt @@ -32,9 +32,7 @@ import ch.dissem.apps.abit.repository.AndroidLabelRepository.Companion.LABEL_ARC import ch.dissem.apps.abit.service.Singleton import ch.dissem.apps.abit.service.Singleton.currentLabel import ch.dissem.apps.abit.synchronization.SyncAdapter -import ch.dissem.apps.abit.util.Labels -import ch.dissem.apps.abit.util.NetworkUtils -import ch.dissem.apps.abit.util.Preferences +import ch.dissem.apps.abit.util.* import ch.dissem.bitmessage.BitmessageContext import ch.dissem.bitmessage.entity.BitmessageAddress import ch.dissem.bitmessage.entity.Plaintext @@ -404,8 +402,8 @@ class MainActivity : AppCompatActivity(), ListSelectionListener { .withIdentifier(label.id as Long) .withName(label.toString()) .withTag(label) - .withIcon(Labels.getIcon(label)) - .withIconColor(Labels.getColor(label)) + .withIcon(label.getIcon()) + .withIconColor(label.getColor(0xFF000000.toInt())) drawer.addItemAtPosition(item, drawer.drawerItems.size - 3) } diff --git a/app/src/main/java/ch/dissem/apps/abit/MessageDetailFragment.kt b/app/src/main/java/ch/dissem/apps/abit/MessageDetailFragment.kt index 6e08ad2..e9d9780 100644 --- a/app/src/main/java/ch/dissem/apps/abit/MessageDetailFragment.kt +++ b/app/src/main/java/ch/dissem/apps/abit/MessageDetailFragment.kt @@ -29,6 +29,7 @@ import android.text.util.Linkify.WEB_URLS import android.view.* import android.widget.ImageView import android.widget.TextView +import ch.dissem.apps.abit.adapter.LabelAdapter import ch.dissem.apps.abit.service.Singleton import ch.dissem.apps.abit.util.Assets import ch.dissem.apps.abit.util.Constants.BITMESSAGE_ADDRESS_PATTERN @@ -259,40 +260,6 @@ class MessageDetailFragment : Fragment() { } } - private class LabelAdapter internal constructor(private val ctx: Context, labels: Set