Skip to content

Commit

Permalink
Fix bug in adding logic
Browse files Browse the repository at this point in the history
  • Loading branch information
haanhvu committed Nov 18, 2024
1 parent 26873c9 commit 79971a1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public void removeItem(Bookmark aBookmark) {
}

public void addItem(String title, String url) {
if (!url.startsWith("http://") || !url.startsWith("https://")) {
url = "https://" + url;
}
SessionStore.get().getBookmarkStore().addBookmark(url, title);
Bookmark item = new Bookmark(title, url);
bookmarkItems.add(item);
Expand Down

0 comments on commit 79971a1

Please sign in to comment.