Skip to content

Commit

Permalink
Show the “Bookmark Deleted” toast even if there’s no hostname.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Dec 3, 2023
1 parent 6e73ff6 commit 4da07f5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions DuckDuckGo/BookmarksViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,6 @@ extension BookmarksViewController: AddOrEditBookmarkViewControllerDelegate {
func showBookmarkDeletedMessage(_ bookmark: BookmarkEntity) {
guard let parent = bookmark.parent,
let index = parent.childrenArray.firstIndex(of: bookmark),
let domain = bookmark.urlObject?.host,
let title = bookmark.title,
let url = bookmark.url else {
assertionFailure()
Expand All @@ -962,9 +961,11 @@ extension BookmarksViewController: AddOrEditBookmarkViewControllerDelegate {
self?.tableView.reloadData()
self?.refreshAll()
} onDidDismiss: {
NotificationCenter.default.post(name: FireproofFaviconUpdater.deleteFireproofFaviconNotification,
object: nil,
userInfo: [FireproofFaviconUpdater.UserInfoKeys.faviconDomain: domain])
if let domain = bookmark.urlObject?.host {
NotificationCenter.default.post(name: FireproofFaviconUpdater.deleteFireproofFaviconNotification,
object: nil,
userInfo: [FireproofFaviconUpdater.UserInfoKeys.faviconDomain: domain])
}
}
}

Expand Down

0 comments on commit 4da07f5

Please sign in to comment.