For #21776 - Remove unnecessary type argument
This commit is contained in:
parent
272d31b2b4
commit
76c746b982
|
@ -19,7 +19,7 @@ class AccountAuthErrorPreference @JvmOverloads constructor(
|
||||||
attributeSetId: Int = android.R.attr.preferenceStyle
|
attributeSetId: Int = android.R.attr.preferenceStyle
|
||||||
) : Preference(context, attrs, attributeSetId) {
|
) : Preference(context, attrs, attributeSetId) {
|
||||||
private var emailView: TextView? = null
|
private var emailView: TextView? = null
|
||||||
var email: String? by Delegates.observable<String?>(null) { _, _, new -> updateEmailView(new) }
|
var email: String? by Delegates.observable(null) { _, _, new -> updateEmailView(new) }
|
||||||
|
|
||||||
init {
|
init {
|
||||||
layoutResource = R.layout.account_auth_error_preference
|
layoutResource = R.layout.account_auth_error_preference
|
||||||
|
|
|
@ -19,11 +19,11 @@ class AccountPreference @JvmOverloads constructor(
|
||||||
) : Preference(context, attrs) {
|
) : Preference(context, attrs) {
|
||||||
private var emailView: TextView? = null
|
private var emailView: TextView? = null
|
||||||
private var displayNameView: TextView? = null
|
private var displayNameView: TextView? = null
|
||||||
var displayName: String? by Delegates.observable<String?>(null) { _, _, new ->
|
var displayName: String? by Delegates.observable(null) { _, _, new ->
|
||||||
updateDisplayName(new)
|
updateDisplayName(new)
|
||||||
}
|
}
|
||||||
|
|
||||||
var email: String? by Delegates.observable<String?>(null) { _, _, new ->
|
var email: String? by Delegates.observable(null) { _, _, new ->
|
||||||
new?.let { updateEmailText(it) }
|
new?.let { updateEmailText(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,8 @@ import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.Observer
|
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.paging.LivePagedListBuilder
|
import androidx.paging.LivePagedListBuilder
|
||||||
import androidx.paging.PagedList
|
|
||||||
import androidx.paging.PagedListAdapter
|
import androidx.paging.PagedListAdapter
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
@ -96,7 +94,7 @@ class SitePermissionsExceptionsFragment :
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bindEmptyContainerMess(rootView: View) {
|
private fun bindEmptyContainerMess(rootView: View) {
|
||||||
emptyContainerMessage = rootView.findViewById<View>(R.id.empty_exception_container)
|
emptyContainerMessage = rootView.findViewById(R.id.empty_exception_container)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bindClearButton(rootView: View) {
|
private fun bindClearButton(rootView: View) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ class SitePermissionsFragment : PreferenceFragmentCompat() {
|
||||||
|
|
||||||
private fun bindExceptions() {
|
private fun bindExceptions() {
|
||||||
val keyExceptions = getPreferenceKey(R.string.pref_key_show_site_exceptions)
|
val keyExceptions = getPreferenceKey(R.string.pref_key_show_site_exceptions)
|
||||||
val exceptionsCategory = requireNotNull<Preference>(findPreference(keyExceptions))
|
val exceptionsCategory = requireNotNull(findPreference(keyExceptions))
|
||||||
|
|
||||||
exceptionsCategory.onPreferenceClickListener = OnPreferenceClickListener {
|
exceptionsCategory.onPreferenceClickListener = OnPreferenceClickListener {
|
||||||
val directions = SitePermissionsFragmentDirections.actionSitePermissionsToExceptions()
|
val directions = SitePermissionsFragmentDirections.actionSitePermissionsToExceptions()
|
||||||
|
|
|
@ -207,7 +207,7 @@ class SitePermissionsManageExceptionsPhoneFeatureFragment : Fragment() {
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
internal fun bindBlockedByAndroidContainer() {
|
internal fun bindBlockedByAndroidContainer() {
|
||||||
blockedByAndroidView = rootView.findViewById<View>(R.id.permissions_blocked_container)
|
blockedByAndroidView = rootView.findViewById(R.id.permissions_blocked_container)
|
||||||
initSettingsButton(blockedByAndroidView)
|
initSettingsButton(blockedByAndroidView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class ExtensionsTest {
|
||||||
every { components.core.store } returns store
|
every { components.core.store } returns store
|
||||||
|
|
||||||
components.tryReloadTabBy("https://www.getpocket.com".getOrigin()!!)
|
components.tryReloadTabBy("https://www.getpocket.com".getOrigin()!!)
|
||||||
verify(exactly = 0) { components.useCases.sessionUseCases.reload(any<String>()) }
|
verify(exactly = 0) { components.useCases.sessionUseCases.reload(any()) }
|
||||||
|
|
||||||
components.tryReloadTabBy("https://www.mozilla.org".getOrigin()!!)
|
components.tryReloadTabBy("https://www.mozilla.org".getOrigin()!!)
|
||||||
verify { components.useCases.sessionUseCases.reload("2") }
|
verify { components.useCases.sessionUseCases.reload("2") }
|
||||||
|
|
|
@ -24,7 +24,7 @@ class MozillaBannedPropertyAccess(config: Config = Config.empty) : Rule(config)
|
||||||
private val banned by lazy {
|
private val banned by lazy {
|
||||||
val bannedPropertiesList = valueOrDefault("bannedProperties", "")
|
val bannedPropertiesList = valueOrDefault("bannedProperties", "")
|
||||||
if (bannedPropertiesList.contentEquals("")) {
|
if (bannedPropertiesList.contentEquals("")) {
|
||||||
listOf<String>()
|
listOf()
|
||||||
} else {
|
} else {
|
||||||
bannedPropertiesList.split(",")
|
bannedPropertiesList.split(",")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue