For #16162: Simplify site addresses in saved logins view

This is what Firefox Desktop does.
This commit is contained in:
Alexander Gramiak 2022-10-15 18:49:17 -06:00 committed by mergify[bot]
parent 0c13a5aa5d
commit 9fd2d20310
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import androidx.core.view.isVisible
import org.mozilla.fenix.databinding.LoginsItemBinding
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.loadIntoView
import org.mozilla.fenix.ext.simplifiedUrl
import org.mozilla.fenix.settings.logins.SavedLogin
import org.mozilla.fenix.settings.logins.interactor.SavedLoginsInteractor
import org.mozilla.fenix.utils.view.ViewHolder
@ -29,7 +30,7 @@ class LoginsListViewHolder(
timeLastUsed = item.timeLastUsed,
)
val binding = LoginsItemBinding.bind(view)
binding.webAddressView.text = item.origin
binding.webAddressView.text = item.origin.simplifiedUrl()
binding.usernameView.isVisible = item.username.isNotEmpty()
binding.usernameView.text = item.username