Closed tarptaeya closed 6 years ago
I don't see a reason why to disallow multiple bookmarks with same url.
Also the code calling this method (BookmarksModel::addBookmark
) assumes that adding bookmark always succeeds, so this will break the assumption.
It fills the space of bookmark toolbar with same bookmark otherwise
There already is a warning that the url is bookmarked when creating new bookmark.
Hmm I thought there is, but there really is not.
In that case a warning should be added to add bookmark dialog (BookmarksTools::addBookmarkDialog
).
This now lets the user modify the bookmark title / folder and only show warning messagebox right before actually storing the bookmark. That's just annoying and late (+ it leaks BookmarkItem in case of bookmark not being added).
What I had in mind with "warning" is to just show text in add bookmark dialog like (wording can be changed):
NOTE: This site is already bookmarked.
This label can be added eg. between folder combobox and dialog button box (ok/cancel buttons).
Done, but I have preserved the BookmarksTools::allowDuplicateBookmarks
for the case when dropping duplicate urls to bookmarks toolbar
context menu and drop url creates duplicate bookmarks if done more than once because there is no check if the bookmark already exists.