~julienxx/castor

57f402e429df0b48c08156190e22cd02de7172d6 — Julien Blanchard 4 months ago 90f04f3 0.8.10
Fix for empty bookmark
1 files changed, 5 insertions(+), 2 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +5 -2
@@ 157,9 157,12 @@ fn update_url_field(gui: &Arc<Gui>, url: &str) {
fn add_bookmark(gui: &Arc<Gui>) {
    let url_bar = gui.url_bar();
    let current_url = url_bar.get_text();

    if let Some(url) = current_url {
        bookmarks::add(&url);
        dialog::info(&gui, "Bookmark added.");
        if url != "" {
            bookmarks::add(&url);
            dialog::info(&gui, "Bookmark added.");
        }
    }
}