From dc49efa132eb509df323c57b62c85a1950fe261e Mon Sep 17 00:00:00 2001 From: NejcZdovc Date: Wed, 6 Sep 2017 11:31:15 +0200 Subject: [PATCH] Fixes bookmark move location cache Resolves #7032 Auditors: Test Plan: --- app/common/state/bookmarksState.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/common/state/bookmarksState.js b/app/common/state/bookmarksState.js index 6d0b38c2a27..9013e776957 100644 --- a/app/common/state/bookmarksState.js +++ b/app/common/state/bookmarksState.js @@ -270,10 +270,15 @@ const bookmarksState = { : destinationItem.get('folderId') state = bookmarkOrderCache.removeCacheKey(state, bookmark.get('parentFolderId'), bookmarkKey) + state = bookmarkLocationCache.removeCacheKey(state, bookmark.get('location'), bookmarkKey) + bookmark = bookmark.set('parentFolderId', ~~parentFolderId) const newKey = bookmarkUtil.getKey(bookmark) + state = state.deleteIn([STATE_SITES.BOOKMARKS, bookmarkKey]) state = bookmarkOrderCache.addBookmarkToCache(state, bookmark.get('parentFolderId'), newKey) + state = bookmarkLocationCache.addCacheKey(state, bookmark.get('location'), newKey) + bookmark = bookmark.set('key', newKey) return state.setIn([STATE_SITES.BOOKMARKS, newKey], bookmark) }