code review

This commit is contained in:
Jonathan Rainville 2020-11-27 15:31:50 -05:00 committed by Iuri Matias
parent 7d1e9212ca
commit 6e7bb6ba1c
3 changed files with 10 additions and 6 deletions

View File

@ -6,12 +6,17 @@ proc storeBookmark*(url: string, name: string): Bookmark =
try:
let resp = callPrivateRPC("browsers_storeBookmark", payload).parseJson["result"]
result.imageUrl = resp["imageUrl"].getStr
except:
except Exception as e:
error "Error updating bookmark", msg = e.msg
discard
proc updateBookmark*(ogUrl: string, url: string, name: string) =
let payload = %* [ogUrl, {"url": url, "name": name}]
discard callPrivateRPC("browsers_updateBookmark", payload)
try:
discard callPrivateRPC("browsers_updateBookmark", payload)
except Exception as e:
error "Error updating bookmark", msg = e.msg
discard
proc getBookmarks*(): string =
let payload = %* []

View File

@ -1,5 +1,5 @@
import core, ./types, ../signals/types as statusgo_types, ./accounts/constants, ./utils
import json, tables, sugar, sequtils, chronicles, strutils
import json, tables, sugar, sequtils, strutils
import json_serialization
import locks
@ -28,7 +28,6 @@ proc getSettings*(useCached: bool = true, keepSensitiveData: bool = false): Json
withLock settingsLock:
if useCached and not dirty and not keepSensitiveData:
result = settings
# debug "setting", settings
else:
result = callPrivateRPC("settings_getSettings").parseJSON()["result"]
if (keepSensitiveData):

View File

@ -18,8 +18,8 @@ PopupMenu {
Action {
text: qsTr("Open in new Tab")
icon.source: "../../img/generate_account.svg"
icon.width: 12
icon.height: 12
icon.width: 16
icon.height: 16
onTriggered: {
openInNewTab(root.url)
}