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

Commit 458052c2 authored by Fahim M. Choudhury's avatar Fahim M. Choudhury Committed by Nishith Khanna
Browse files

feat: format F-Droid and PWA apps' description with correct style

F-Droid and PWA apps' description come as plain text whereas Google Play apps' description are in HTML.

These descriptions are now formatted based on their source - either HTML or plain text.
parent 54ec35f2
Loading
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -267,12 +267,19 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) {
    }

    private fun updateAppDescriptionText(it: Application) {
        binding.appDescription.text =
        val description =
            if (it.isFDroidApp || it.is_pwa) {
                it.description
            } else {
                Html.fromHtml(it.description, Html.FROM_HTML_MODE_COMPACT)
            }
        binding.appDescription.text = description

        binding.appDescriptionMore.setOnClickListener { view ->
            val action =
                ApplicationFragmentDirections.actionApplicationFragmentToDescriptionFragment(it.description)
                ApplicationFragmentDirections.actionApplicationFragmentToDescriptionFragment(
                    description.toString()
                )
            view.findNavController().navigate(action)
        }
    }
+1 −3
Original line number Diff line number Diff line
package foundation.e.apps.ui.application.subFrags

import android.os.Bundle
import android.text.Html
import android.view.View
import androidx.fragment.app.Fragment
import androidx.navigation.findNavController
@@ -27,8 +26,7 @@ class DescriptionFragment : Fragment(R.layout.fragment_description) {
                view.findNavController().navigateUp()
            }
        }

        binding.descriptionTV.text = Html.fromHtml(args.description, Html.FROM_HTML_MODE_COMPACT)
        binding.descriptionTV.text = args.description
    }

    override fun onDestroyView() {