From 3b45540312489043c2a0654aea488e3cf1c17728 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 9 Mar 2021 08:38:01 +0200 Subject: App: Initial bookmarks Don't automatically make "Getting Started" a remote bookmark source. 1) Rather not DDOS my server. Remote sources are not cached currently. 2) While it's a nice demo of the feature, it's not essential. 3) Avoid appearance of a "call home" default that one needs to opt out of. --- src/bookmarks.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/bookmarks.c') diff --git a/src/bookmarks.c b/src/bookmarks.c index cf29fc69..026b80d6 100644 --- a/src/bookmarks.c +++ b/src/bookmarks.c @@ -197,13 +197,15 @@ void save_Bookmarks(const iBookmarks *d, const char *dirPath) { unlock_Mutex(d->mtx); } -uint32_t add_Bookmarks(iBookmarks *d, const iString *url, const iString *title, - const iString *tags, iChar icon) { +uint32_t add_Bookmarks(iBookmarks *d, const iString *url, const iString *title, const iString *tags, + iChar icon) { lock_Mutex(d->mtx); iBookmark *bm = new_Bookmark(); set_String(&bm->url, url); set_String(&bm->title, title); - if (tags) set_String(&bm->tags, tags); + if (tags) { + set_String(&bm->tags, tags); + } bm->icon = icon; initCurrent_Time(&bm->when); insert_Bookmarks_(d, bm); @@ -441,7 +443,7 @@ void requestFinished_Bookmarks(iBookmarks *d, iGmRequest *req) { iRangecc line = srcLine; trimEnd_Rangecc(&line); iRegExpMatch m; - init_RegExpMatch(&m); + init_RegExpMatch(&m); if (matchRange_RegExp(linkPattern, line, &m)) { const iRangecc url = capturedRange_RegExpMatch(&m, 1); const iRangecc title = capturedRange_RegExpMatch(&m, 3); -- cgit v1.2.3