mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[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)
This commit is contained in:
parent
4e1f40b41b
commit
9a60af122f
@ -321,12 +321,9 @@ class DefaultSessionControlController(
|
|||||||
setTitle(R.string.rename_top_site)
|
setTitle(R.string.rename_top_site)
|
||||||
setView(customLayout)
|
setView(customLayout)
|
||||||
setPositiveButton(R.string.top_sites_rename_dialog_ok) { dialog, _ ->
|
setPositiveButton(R.string.top_sites_rename_dialog_ok) { dialog, _ ->
|
||||||
val newTitle = topSiteLabelEditText.text.toString()
|
viewLifecycleScope.launch(Dispatchers.IO) {
|
||||||
if (newTitle.isNotBlank()) {
|
with(activity.components.useCases.topSitesUseCase) {
|
||||||
viewLifecycleScope.launch(Dispatchers.IO) {
|
renameTopSites(topSite, topSiteLabelEditText.text.toString())
|
||||||
with(activity.components.useCases.topSitesUseCase) {
|
|
||||||
renameTopSites(topSite, newTitle)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
|
Loading…
Reference in New Issue
Block a user