Remove content_tags
and related functions
No longer necessary. Also removed a few doToggleTagFollowDesktop props (unused by the View).
This commit is contained in:
parent
f3634c881d
commit
3b87f0aba6
9 changed files with 1 additions and 37 deletions
|
@ -60,7 +60,6 @@ type Analytics = {
|
|||
toggleInternal: (boolean, ?boolean) => void,
|
||||
apiLogView: (string, string, string, ?number, ?() => void) => Promise<any>,
|
||||
apiLogPublish: (ChannelClaim | StreamClaim) => void,
|
||||
apiSyncTags: ({}) => void,
|
||||
tagFollowEvent: (string, boolean, ?string) => void,
|
||||
playerLoadedEvent: (string, ?boolean) => void,
|
||||
playerVideoStartedEvent: (?boolean) => void,
|
||||
|
@ -363,12 +362,6 @@ const analytics: Analytics = {
|
|||
Lbryio.call('event', 'publish', params);
|
||||
}
|
||||
},
|
||||
|
||||
apiSyncTags: (params) => {
|
||||
if (internalAnalyticsEnabled && isProduction) {
|
||||
Lbryio.call('content_tags', 'sync', params);
|
||||
}
|
||||
},
|
||||
adsFetchedEvent: () => {
|
||||
sendGaEvent('ad_fetched');
|
||||
},
|
||||
|
|
|
@ -9,7 +9,6 @@ import { doClaimSearch } from 'redux/actions/claims';
|
|||
import * as SETTINGS from 'constants/settings';
|
||||
import { selectFollowedTags } from 'redux/selectors/tags';
|
||||
import { selectMutedChannels } from 'redux/selectors/blocked';
|
||||
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
||||
import { selectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
|
||||
import { selectModerationBlockList } from 'redux/selectors/comments';
|
||||
import ClaimListDiscover from './view';
|
||||
|
@ -31,7 +30,6 @@ const select = (state, props) => ({
|
|||
|
||||
const perform = {
|
||||
doClaimSearch,
|
||||
doToggleTagFollowDesktop,
|
||||
doFetchViewCount,
|
||||
};
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@ type Props = {
|
|||
|
||||
// --- perform ---
|
||||
doClaimSearch: ({}) => void,
|
||||
doToggleTagFollowDesktop: (string) => void,
|
||||
doFetchViewCount: (claimIdCsv: string) => void,
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { selectFetchingClaimSearch } from 'redux/selectors/claims';
|
||||
import { selectFollowedTags } from 'redux/selectors/tags';
|
||||
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
||||
import { selectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
|
||||
import { doSetClientSetting } from 'redux/actions/settings';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
|
@ -16,7 +15,6 @@ const select = (state) => ({
|
|||
});
|
||||
|
||||
const perform = {
|
||||
doToggleTagFollowDesktop,
|
||||
doSetClientSetting,
|
||||
};
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import { doClaimSearch } from 'redux/actions/claims';
|
|||
import * as SETTINGS from 'constants/settings';
|
||||
import { MATURE_TAGS } from 'constants/tags';
|
||||
import { doFetchViewCount } from 'lbryinc';
|
||||
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
||||
import { selectClientSetting, selectShowMatureContent } from 'redux/selectors/settings';
|
||||
import { selectMutedAndBlockedChannelIds } from 'redux/selectors/blocked';
|
||||
import { ENABLE_NO_SOURCE_CLAIMS, SIMPLE_SITE } from 'config';
|
||||
|
@ -30,7 +29,6 @@ const select = (state, props) => {
|
|||
|
||||
const perform = {
|
||||
doClaimSearch,
|
||||
doToggleTagFollowDesktop,
|
||||
doFetchViewCount,
|
||||
};
|
||||
|
||||
|
|
|
@ -211,7 +211,6 @@ function areEqual(prev: Props, next: Props) {
|
|||
'match',
|
||||
'claimsByUri',
|
||||
'doClaimSearch',
|
||||
'doToggleTagFollowDesktop',
|
||||
];
|
||||
|
||||
const propKeys = Object.keys(next);
|
||||
|
|
|
@ -17,7 +17,6 @@ import { doFetchFileInfos } from 'redux/actions/file_info';
|
|||
import { doClearSupport, doBalanceSubscribe } from 'redux/actions/wallet';
|
||||
import { doClearPublish } from 'redux/actions/publish';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import { selectFollowedTagsList } from 'redux/selectors/tags';
|
||||
import { doToast, doError, doNotificationList } from 'redux/actions/notifications';
|
||||
import pushNotifications from '$web/src/push-notifications';
|
||||
|
||||
|
@ -512,17 +511,6 @@ export function doAnalyticsBuffer(uri, bufferData) {
|
|||
};
|
||||
}
|
||||
|
||||
export function doAnalyticsTagSync() {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const tags = selectFollowedTagsList(state);
|
||||
const stringOfTags = tags.join(',');
|
||||
if (stringOfTags) {
|
||||
analytics.apiSyncTags({ content_tags: stringOfTags });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function doAnaltyicsPurchaseEvent(fileInfo) {
|
||||
return (dispatch) => {
|
||||
let purchasePrice = fileInfo.purchase_receipt && fileInfo.purchase_receipt.amount;
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
} from 'redux/selectors/sync';
|
||||
import { selectClientSetting } from 'redux/selectors/settings';
|
||||
import { getSavedPassword, getAuthToken } from 'util/saved-passwords';
|
||||
import { doAnalyticsTagSync, doHandleSyncComplete } from 'redux/actions/app';
|
||||
import { doHandleSyncComplete } from 'redux/actions/app';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { X_LBRY_AUTH_TOKEN } from 'constants/token';
|
||||
|
||||
|
@ -130,7 +130,6 @@ export function doSyncLoop(noInterval?: boolean) {
|
|||
const syncEnabled = selectClientSetting(state, SETTINGS.ENABLE_SYNC);
|
||||
if (syncEnabled) {
|
||||
dispatch(doGetSyncDesktop((error, hasNewData) => dispatch(doHandleSyncComplete(error, hasNewData))));
|
||||
dispatch(doAnalyticsTagSync());
|
||||
}
|
||||
}, SYNC_INTERVAL);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
// @flow
|
||||
import { selectFollowedTagsList } from 'redux/selectors/tags';
|
||||
import { selectPrefsReady } from 'redux/selectors/sync';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
|
||||
import analytics from 'analytics';
|
||||
import { doAlertWaitingForSync } from 'redux/actions/app';
|
||||
|
||||
export const doToggleTagFollowDesktop = (name: string) => (dispatch: Dispatch, getState: GetState) => {
|
||||
const state = getState();
|
||||
const tags = selectFollowedTagsList(state);
|
||||
const ready = selectPrefsReady(state);
|
||||
if (!ready) {
|
||||
return dispatch(doAlertWaitingForSync());
|
||||
|
@ -20,11 +17,6 @@ export const doToggleTagFollowDesktop = (name: string) => (dispatch: Dispatch, g
|
|||
name,
|
||||
},
|
||||
});
|
||||
|
||||
const stringOfTags = tags.join(',');
|
||||
if (stringOfTags) {
|
||||
analytics.apiSyncTags({ content_tags: stringOfTags });
|
||||
}
|
||||
};
|
||||
|
||||
export const doAddTag = (name: string) => ({
|
||||
|
|
Loading…
Reference in a new issue