mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2358 from omnivore-app/feat/api-reduce-events
feat/api reduce events
This commit is contained in:
commit
42465828ed
3 changed files with 6 additions and 36 deletions
|
|
@ -438,15 +438,6 @@ export const getArticleResolver: ResolverFn<
|
|||
format === ArticleFormat.Distiller ||
|
||||
!!graphqlFields(info).article.originalHtml
|
||||
|
||||
analytics.track({
|
||||
userId: claims?.uid,
|
||||
event: 'link_fetched',
|
||||
properties: {
|
||||
slug,
|
||||
env: env.server.apiEnv,
|
||||
},
|
||||
})
|
||||
|
||||
// We allow the backend to use the ID instead of a slug to fetch the article
|
||||
const page =
|
||||
(await getPageByParam(
|
||||
|
|
@ -900,15 +891,6 @@ export const searchResolver = authorized<
|
|||
|
||||
const searchQuery = parseSearchQuery(params.query || undefined)
|
||||
|
||||
analytics.track({
|
||||
userId: claims.uid,
|
||||
event: 'search',
|
||||
properties: {
|
||||
env: env.server.apiEnv,
|
||||
...searchQuery,
|
||||
},
|
||||
})
|
||||
|
||||
let results: SearchItemData[]
|
||||
let totalCount: number
|
||||
|
||||
|
|
@ -1036,17 +1018,6 @@ export const updatesSinceResolver = authorized<
|
|||
return { errorCodes: [UpdatesSinceErrorCode.Unauthorized] }
|
||||
}
|
||||
|
||||
analytics.track({
|
||||
userId: uid,
|
||||
event: 'updatesSince',
|
||||
properties: {
|
||||
env: env.server.apiEnv,
|
||||
since,
|
||||
first,
|
||||
after,
|
||||
},
|
||||
})
|
||||
|
||||
const sort = sortParamsToElasticSort(sortParams)
|
||||
|
||||
const startCursor = after || ''
|
||||
|
|
|
|||
|
|
@ -76,13 +76,15 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
|||
const focusedHighlightMousePos = useRef({ pageX: 0, pageY: 0 })
|
||||
|
||||
const [currentHighlightIdx, setCurrentHighlightIdx] = useState(0)
|
||||
const [focusedHighlight, setFocusedHighlight] =
|
||||
useState<Highlight | undefined>(undefined)
|
||||
const [focusedHighlight, setFocusedHighlight] = useState<
|
||||
Highlight | undefined
|
||||
>(undefined)
|
||||
|
||||
const [selectionData, setSelectionData] = useSelection(highlightLocations)
|
||||
|
||||
const [labelsTarget, setLabelsTarget] =
|
||||
useState<Highlight | undefined>(undefined)
|
||||
const [labelsTarget, setLabelsTarget] = useState<Highlight | undefined>(
|
||||
undefined
|
||||
)
|
||||
|
||||
const createHighlightFromSelection = useCallback(
|
||||
async (
|
||||
|
|
@ -346,7 +348,6 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
|||
highlightModalAction: 'addComment',
|
||||
})
|
||||
} else {
|
||||
console.log('sending page tapped')
|
||||
window?.webkit?.messageHandlers.viewerAction?.postMessage({
|
||||
actionID: 'pageTapped',
|
||||
})
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ export function Notebook(props: NotebookProps): JSX.Element {
|
|||
)
|
||||
const [, updateState] = useState({})
|
||||
|
||||
console.log('props.showConfirmDeleteNote', props.showConfirmDeleteNote)
|
||||
|
||||
const annotationsReducer = (
|
||||
state: AnnotationInfo,
|
||||
action: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue