add: event calls for search and publish
This commit is contained in:
parent
09e13ca194
commit
762dc19f9f
2 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,7 @@ import {
|
||||||
doSearch,
|
doSearch,
|
||||||
doToast,
|
doToast,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
|
import { Lbryio } from 'lbryinc';
|
||||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||||
import * as settings from 'constants/settings';
|
import * as settings from 'constants/settings';
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
|
@ -34,6 +35,8 @@ const perform = dispatch => ({
|
||||||
onSearch: (query, size) => {
|
onSearch: (query, size) => {
|
||||||
dispatch(doSearch(query, size));
|
dispatch(doSearch(query, size));
|
||||||
dispatch(doNavigate(`/search`, { query }));
|
dispatch(doNavigate(`/search`, { query }));
|
||||||
|
// Ideally this would live inside doSearch, but lbry-redux does not have access to lbryinc
|
||||||
|
Lbryio.call('event', 'search');
|
||||||
},
|
},
|
||||||
onSubmit: (uri, extraParams) => dispatch(doNavigate('/show', { uri, ...extraParams })),
|
onSubmit: (uri, extraParams) => dispatch(doNavigate('/show', { uri, ...extraParams })),
|
||||||
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
||||||
|
|
|
@ -6,6 +6,7 @@ import type {
|
||||||
UpdatePublishFormAction,
|
UpdatePublishFormAction,
|
||||||
PublishParams,
|
PublishParams,
|
||||||
} from 'redux/reducers/publish';
|
} from 'redux/reducers/publish';
|
||||||
|
import { CC_LICENSES, COPYRIGHT, OTHER, NONE, PUBLIC_DOMAIN } from 'constants/licenses';
|
||||||
import * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
import {
|
import {
|
||||||
ACTIONS,
|
ACTIONS,
|
||||||
|
@ -18,12 +19,12 @@ import {
|
||||||
selectMyClaimsWithoutChannels,
|
selectMyClaimsWithoutChannels,
|
||||||
doError,
|
doError,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
|
import { Lbryio } from 'lbryinc';
|
||||||
import { doOpenModal } from 'redux/actions/app';
|
import { doOpenModal } from 'redux/actions/app';
|
||||||
import { selectosNotificationsEnabled } from 'redux/selectors/settings';
|
import { selectosNotificationsEnabled } from 'redux/selectors/settings';
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { CC_LICENSES, COPYRIGHT, OTHER, NONE, PUBLIC_DOMAIN } from 'constants/licenses';
|
|
||||||
|
|
||||||
type Action = UpdatePublishFormAction | { type: ACTIONS.CLEAR_PUBLISH };
|
type Action = UpdatePublishFormAction | { type: ACTIONS.CLEAR_PUBLISH };
|
||||||
|
|
||||||
|
@ -273,6 +274,8 @@ export const doPublish = (params: PublishParams) => (
|
||||||
dispatch({ type: ACTIONS.PUBLISH_START });
|
dispatch({ type: ACTIONS.PUBLISH_START });
|
||||||
|
|
||||||
const success = pendingClaim => {
|
const success = pendingClaim => {
|
||||||
|
Lbryio.call('event', 'publish');
|
||||||
|
|
||||||
const actions = [];
|
const actions = [];
|
||||||
|
|
||||||
actions.push({
|
actions.push({
|
||||||
|
|
Loading…
Reference in a new issue