2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] add invalid URL error to show up when trying to save an invalid bookmark

This commit is contained in:
Sammy Khamis 2022-01-24 18:02:43 -10:00 committed by mergify[bot]
parent caabbcc848
commit 781d6fb3b5

View File

@ -1262,7 +1262,19 @@ abstract class BaseBrowserFragment :
}
}
} catch (e: PlacesException.UrlParseFailed) {
println("We should do something here")
withContext(Main) {
requireComponents.analytics.metrics.track(Event.AddBookmark)
view?.let {
FenixSnackbar.make(
view = binding.browserLayout,
duration = FenixSnackbar.LENGTH_LONG,
isDisplayedWithBrowserToolbar = true
)
.setText(getString(R.string.bookmark_invalid_url_error))
.show()
}
}
}
}
}