1
0
Fork 0

For #6063 - changed ETP blocking info title strings (#6082)

master
Mihai Branescu 2019-10-21 19:58:47 +03:00 committed by Jeff Boek
parent d223a0bd35
commit e23528291a
1 changed files with 11 additions and 6 deletions

View File

@ -13,7 +13,8 @@ import androidx.navigation.fragment.navArgs
import kotlinx.android.synthetic.main.fragment_tracking_protection_blocking.*
import org.mozilla.fenix.R
class TrackingProtectionBlockingFragment : Fragment(R.layout.fragment_tracking_protection_blocking) {
class TrackingProtectionBlockingFragment :
Fragment(R.layout.fragment_tracking_protection_blocking) {
private val args: TrackingProtectionBlockingFragmentArgs by navArgs()
@ -25,11 +26,15 @@ class TrackingProtectionBlockingFragment : Fragment(R.layout.fragment_tracking_p
override fun onResume() {
super.onResume()
(activity as AppCompatActivity).title =
getString(
if (args.strictMode) R.string.preference_enhanced_tracking_protection_strict else
R.string.preference_enhanced_tracking_protection_standard
)
(activity as AppCompatActivity).title = getTitle()
(activity as AppCompatActivity).supportActionBar?.show()
}
private fun getTitle(): String {
return if (args.strictMode) {
getString(R.string.preference_enhanced_tracking_protection_strict_default)
} else {
getString(R.string.preference_enhanced_tracking_protection_standard_option)
}
}
}