Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df5d1677 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Filter properly tags

parent 117d37d0
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -24,10 +24,13 @@ enum class Source {
    PWA;

    override fun toString(): String {
        return name.lowercase()
        return when (this) {
            PLAY_STORE -> ""
            else -> name.lowercase()
                    .split("_")
                    .joinToString(" ") { it.replaceFirstChar(Char::uppercase) }
        }
    }

    companion object {
        fun fromString(source: String): Source {
+6 −1
Original line number Diff line number Diff line
@@ -239,7 +239,12 @@ class ApplicationListRVAdapter(
    }

    private fun ApplicationListItemBinding.updateSourceTag(searchApp: Application) {
        sourceTag.text = searchApp.source.toString()
        sourceTag.visibility = View.INVISIBLE
        val tag = searchApp.source.toString()
        if (tag.isNotBlank()) {
            sourceTag.text = tag
            sourceTag.visibility = View.VISIBLE
        }
    }

    private fun handleAppItemClick(