diff --git a/src/renderer/component/userVerify/view.jsx b/src/renderer/component/userVerify/view.jsx index da09e15c3..9220095b1 100644 --- a/src/renderer/component/userVerify/view.jsx +++ b/src/renderer/component/userVerify/view.jsx @@ -2,7 +2,7 @@ import * as React from 'react'; import Button from 'component/button'; import CardVerify from 'component/cardVerify'; -import Lbryio from 'lbryinc'; +import { Lbryio } from 'lbryinc'; import * as icons from 'constants/icons'; type Props = { diff --git a/src/renderer/page/file/view.jsx b/src/renderer/page/file/view.jsx index 828991bca..b9ad65954 100644 --- a/src/renderer/page/file/view.jsx +++ b/src/renderer/page/file/view.jsx @@ -81,6 +81,7 @@ class FilePage extends React.Component { this.checkSubscription(this.props); setViewed(uri); + console.log('claim', this.props.claim); } componentWillReceiveProps(nextProps: Props) { diff --git a/src/renderer/redux/selectors/content.js b/src/renderer/redux/selectors/content.js index f5cc1a7b2..a685fcde7 100644 --- a/src/renderer/redux/selectors/content.js +++ b/src/renderer/redux/selectors/content.js @@ -50,19 +50,20 @@ export const makeSelectHistoryForPage = page => createSelector(selectState, selectClaimsByUri, (state, claimsByUri) => { const left = page * HISTORY_ITEMS_PER_PAGE; const historyItems = state.history.slice(left, left + HISTORY_ITEMS_PER_PAGE); - + // See if we have the claim info for the uris in your history // If not, it will need to be fetched in the component - return historyItems.map(historyItem => { + return historyItems.map((historyItem) => { const { uri, lastViewed } = historyItem; const claimAtUri = claimsByUri[uri]; - + if (claimAtUri) { - return { lastViewed, uri, ...claimAtUri }; + return { lastViewed, uri, ...claimAtUri } } else { + console.log("jsut returning item") return historyItem; } - }); + }) }); export const makeSelectHistoryForUri = uri => diff --git a/src/renderer/store.js b/src/renderer/store.js index 21a415c07..fdb1be5c9 100644 --- a/src/renderer/store.js +++ b/src/renderer/store.js @@ -97,10 +97,7 @@ const store = createStore( ); const compressor = createCompressor(); -// Removing claims from redux-persist to see if it solves https://github.com/lbryio/lbry-desktop/issues/1983 -// We were caching so much data the app was locking up -// We can't add this back until we can perform this in a non-blocking way -// const saveClaimsFilter = createFilter('claims', ['byId', 'claimsByUri']); +const saveClaimsFilter = createFilter('claims', ['byId', 'claimsByUri']); const subscriptionsFilter = createFilter('subscriptions', ['subscriptions']); const contentFilter = createFilter('content', ['positions', 'history']); @@ -108,10 +105,10 @@ const contentFilter = createFilter('content', ['positions', 'history']); const walletFilter = createFilter('wallet', ['receiveAddress']); const persistOptions = { - whitelist: ['subscriptions', 'publish', 'wallet', 'content'], + whitelist: ['claims', 'subscriptions', 'publish', 'wallet', 'content'], // Order is important. Needs to be compressed last or other transforms can't // read the data - transforms: [subscriptionsFilter, walletFilter, contentFilter, compressor], + transforms: [saveClaimsFilter, subscriptionsFilter, walletFilter, contentFilter, compressor], debounce: 10000, storage: localForage, };