fix(@desktop/browser): [base_bc] renaming bookmark is not persistent

Edit existing bookmark name is now correctly updated in the view.

Fixes #4549
This commit is contained in:
Noelia 2022-01-31 12:19:40 +01:00 committed by Sale Djenic
parent e3a5c6bad3
commit bed7ca20fb
2 changed files with 6 additions and 1 deletions

View File

@ -67,6 +67,7 @@ method updateBookmark*(self: Service, oldUrl, newUrl, newName: string): R =
let response = status_go.updateBookmark(oldUrl, newUrl, newName).result let response = status_go.updateBookmark(oldUrl, newUrl, newName).result
self.bookmarks.del(oldUrl) self.bookmarks.del(oldUrl)
self.bookmarks[newUrl] = BookmarkDto()
self.bookmarks[newUrl].url = newUrl self.bookmarks[newUrl].url = newUrl
self.bookmarks[newUrl].name = newName self.bookmarks[newUrl].name = newName
discard response.getProp("imageUrl", self.bookmarks[newurl].imageUrl) discard response.getProp("imageUrl", self.bookmarks[newurl].imageUrl)

View File

@ -39,7 +39,11 @@ PopupMenu {
icon.source: Style.svg("edit") icon.source: Style.svg("edit")
icon.width: 16 icon.width: 16
icon.height: 16 icon.height: 16
onTriggered: editFavoriteTriggered() onTriggered: {
// Force reloading current favorite as it could have been modified when edited:
favoritePopupMenu.currentFavorite = BookmarksStore.getCurrentFavorite(url)
editFavoriteTriggered()
}
} }
Action { Action {