changes to fix up issues with places uniffication

upstream-sync
Sammy Khamis 2 years ago committed by Grisha Kruglov
parent 12347c9999
commit 088339c4de

@ -28,7 +28,7 @@ class BookmarksUseCase(
* one with the identical [url] already exists.
*/
@WorkerThread
suspend operator fun invoke(url: String, title: String, position: Int? = null): Boolean {
suspend operator fun invoke(url: String, title: String, position: UInt? = null): Boolean {
val canAdd = storage.getBookmarksWithUrl(url).firstOrNull { it.url == it.url } == null
if (canAdd) {

@ -99,7 +99,7 @@ fun createNimbus(context: Context, url: String?): NimbusApi {
// Something went wrong. We'd like not to, but stability of the app is more important than
// failing fast here.
errorReporter("Failed to initialize Nimbus", e)
NimbusDisabled()
NimbusDisabled(context)
}
}

@ -27,7 +27,7 @@ import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import mozilla.appservices.places.UrlParseFailed
import mozilla.appservices.places.uniffi.PlacesException
import mozilla.components.concept.storage.BookmarkInfo
import mozilla.components.concept.storage.BookmarkNode
import mozilla.components.concept.storage.BookmarkNodeType
@ -274,7 +274,7 @@ class EditBookmarkFragment : Fragment(R.layout.fragment_edit_bookmark) {
findNavController().popBackStack()
}
} catch (e: UrlParseFailed) {
} catch (e: PlacesException.UrlParseFailed) {
withContext(Main) {
binding.inputLayoutBookmarkUrl.error = getString(R.string.bookmark_invalid_url_error)
binding.inputLayoutBookmarkUrl.setErrorIconDrawable(R.drawable.mozac_ic_warning_with_bottom_padding)

Loading…
Cancel
Save