1
0
Fork 0

No issue: Fix add-on translate() breaking change

master
Arturo Mejia 2020-04-13 11:43:31 -04:00 committed by Emily Kager
parent f687056473
commit 7c279b6e1f
4 changed files with 9 additions and 9 deletions

View File

@ -20,7 +20,8 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import mozilla.components.feature.addons.Addon
import mozilla.components.feature.addons.ui.showInformationDialog
import mozilla.components.feature.addons.ui.translate
import mozilla.components.feature.addons.ui.translatedName
import mozilla.components.feature.addons.ui.translatedDescription
import mozilla.components.feature.addons.update.DefaultAddonUpdater.UpdateAttemptStorage
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.showToolbar
@ -44,7 +45,7 @@ class AddonDetailsFragment : Fragment(R.layout.fragment_add_on_details) {
}
private fun bind(addon: Addon, view: View) {
val title = addon.translatableName.translate()
val title = addon.translatedName
showToolbar(title)
bindDetails(addon, view)
@ -111,7 +112,7 @@ class AddonDetailsFragment : Fragment(R.layout.fragment_add_on_details) {
private fun bindDetails(addon: Addon, view: View) {
val detailsView = view.details
val detailsText = addon.translatableDescription.translate()
val detailsText = addon.translatedDescription
val parsedText = detailsText.replace("\n", "<br/>")
val text = HtmlCompat.fromHtml(parsedText, HtmlCompat.FROM_HTML_MODE_COMPACT)

View File

@ -11,7 +11,7 @@ import android.view.ViewGroup
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import kotlinx.android.synthetic.main.fragment_add_on_internal_settings.*
import mozilla.components.feature.addons.ui.translate
import mozilla.components.feature.addons.ui.translatedName
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.showToolbar
@ -33,7 +33,7 @@ class AddonInternalSettingsFragment : AddonPopupBaseFragment() {
override fun onResume() {
super.onResume()
showToolbar(args.addon.translatableName.translate())
showToolbar(args.addon.translatedName)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View File

@ -15,7 +15,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.android.synthetic.main.fragment_add_on_permissions.view.*
import mozilla.components.feature.addons.Addon
import mozilla.components.feature.addons.ui.AddonPermissionsAdapter
import mozilla.components.feature.addons.ui.translate
import mozilla.components.feature.addons.ui.translatedName
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.showToolbar
import org.mozilla.fenix.theme.ThemeManager
@ -32,7 +32,7 @@ class AddonPermissionsDetailsFragment : Fragment(R.layout.fragment_add_on_permis
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
showToolbar(args.addon.translatableName.translate())
showToolbar(args.addon.translatedName)
bindPermissions(args.addon, view)
bindLearnMore(view)

View File

@ -19,7 +19,6 @@ import kotlinx.coroutines.cancel
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.map
import mozilla.components.feature.addons.Addon
import mozilla.components.feature.addons.ui.translate
import mozilla.components.feature.addons.ui.translatedName
import mozilla.components.lib.state.ext.flowScoped
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
@ -75,7 +74,7 @@ class InstalledAddonDetailsFragment : Fragment() {
}
private fun bind(view: View) {
val title = addon.translatableName.translate()
val title = addon.translatedName
showToolbar(title)
bindEnableSwitch(view)