Skip to content

Commit

Permalink
Fix #5030 - Added bookmark to FF via share sheet doesn’t show up in m…
Browse files Browse the repository at this point in the history
…obile bookmarks (#5041)
  • Loading branch information
Justin D'Arcangelo authored and farhanpatel committed May 28, 2019
1 parent 425b1cb commit c123b1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Extensions/ShareTo/ShareViewController.swift
Expand Up @@ -327,6 +327,7 @@ extension ShareViewController {

if let shareItem = shareItem, case .shareItem(let item) = shareItem {
let profile = BrowserProfile(localName: "profile")
profile._reopen()
_ = profile.places.createBookmark(parentGUID: BookmarkRoots.MobileFolderGUID, url: item.url, title: item.title).value // Intentionally block thread with database call.
profile._shutdown()

Expand All @@ -342,6 +343,7 @@ extension ShareViewController {

if let shareItem = shareItem, case .shareItem(let item) = shareItem {
let profile = BrowserProfile(localName: "profile")
profile._reopen()
profile.readingList.createRecordWithURL(item.url, title: item.title ?? "", addedBy: UIDevice.current.name)
profile._shutdown()

Expand Down

0 comments on commit c123b1e

Please sign in to comment.