From 9a60af122f7ff845d2b6284c3364634e7851c380 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Tue, 5 Jan 2021 16:59:41 -0500 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/16790 - Allow top sites to have an empty name when renamed (https://github.com/mozilla-mobile/fenix/pull/17290) --- .../home/sessioncontrol/SessionControlController.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt index d73d57aa1a..c25f2d1dcb 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt @@ -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()