2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] No issue: Fix new optional adds on arg error

This commit is contained in:
ekager 2020-02-15 13:13:34 -08:00 committed by Emily Kager
parent ef35bc2c24
commit d63350d415

View File

@ -8,6 +8,7 @@ import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs import androidx.navigation.fragment.navArgs
import kotlinx.android.synthetic.main.fragment_add_on_internal_settings.* import kotlinx.android.synthetic.main.fragment_add_on_internal_settings.*
import mozilla.components.feature.addons.ui.translate import mozilla.components.feature.addons.ui.translate
@ -38,9 +39,11 @@ class AddonInternalSettingsFragment : AddonPopupBaseFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
engineSession?.let { engineSession -> args.addon.installedState?.optionsPageUrl?.let {
addonSettingsEngineView.render(engineSession) engineSession?.let { engineSession ->
engineSession.loadUrl(args.addon.installedState!!.optionsPageUrl) addonSettingsEngineView.render(engineSession)
} engineSession.loadUrl(it)
}
} ?: findNavController().navigateUp()
} }
} }