Unverified Commit d0fc086f authored by Gabriel Luong's avatar Gabriel Luong Committed by GitHub
Browse files

For #16790 - Allow top sites to have an empty name when renamed (#17290)

parent afa0454f
......@@ -321,12 +321,9 @@ class DefaultSessionControlController(
setTitle(R.string.rename_top_site)
setView(customLayout)
setPositiveButton(R.string.top_sites_rename_dialog_ok) { dialog, _ ->
val newTitle = topSiteLabelEditText.text.toString()
if (newTitle.isNotBlank()) {
viewLifecycleScope.launch(Dispatchers.IO) {
with(activity.components.useCases.topSitesUseCase) {
renameTopSites(topSite, newTitle)
}
viewLifecycleScope.launch(Dispatchers.IO) {
with(activity.components.useCases.topSitesUseCase) {
renameTopSites(topSite, topSiteLabelEditText.text.toString())
}
}
dialog.dismiss()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment