V smol log cleanups (#10731)
This commit is contained in:
@@ -43,9 +43,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"src/analytics/PassiveAnalytics.tsx": {
|
"src/analytics/PassiveAnalytics.tsx": {
|
||||||
"@typescript-eslint/no-explicit-any": {
|
|
||||||
"count": 1
|
|
||||||
},
|
|
||||||
"react-hooks/purity": {
|
"react-hooks/purity": {
|
||||||
"count": 1
|
"count": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import {useEffect, useRef} from 'react'
|
|||||||
|
|
||||||
import {getCurrentState, onAppStateChange} from '#/lib/appState'
|
import {getCurrentState, onAppStateChange} from '#/lib/appState'
|
||||||
import {useAnalytics} from '#/analytics'
|
import {useAnalytics} from '#/analytics'
|
||||||
import {Features, features} from '#/analytics/features'
|
|
||||||
import {IS_DEV, IS_TESTFLIGHT} from '#/env'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tracks passive analytics like app foreground/background time.
|
* Tracks passive analytics like app foreground/background time.
|
||||||
@@ -27,19 +25,19 @@ export function PassiveAnalytics() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_DEV || IS_TESTFLIGHT) {
|
// if (IS_DEV || IS_TESTFLIGHT) {
|
||||||
const feats = Object.values(Features).reduce(
|
// const feats = Object.values(Features).reduce(
|
||||||
(acc, feat) => {
|
// (acc, feat) => {
|
||||||
acc[feat] = features.evalFeature(feat)
|
// acc[feat] = features.evalFeature(feat)
|
||||||
return acc
|
// return acc
|
||||||
},
|
// },
|
||||||
{} as Record<Features, any>,
|
// {} as Record<Features, any>,
|
||||||
)
|
// )
|
||||||
ax.logger.info('FEATURES', {
|
// ax.logger.info('FEATURES', {
|
||||||
features: feats,
|
// features: feats,
|
||||||
definitions: features.getFeatures(),
|
// definitions: features.getFeatures(),
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
return () => sub.remove()
|
return () => sub.remove()
|
||||||
}, [ax])
|
}, [ax])
|
||||||
|
|||||||
@@ -67,10 +67,6 @@ export class MetricsClient<M extends Record<string, any>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async sendBatch(events: Event<M>[], isRetry: boolean = false) {
|
private async sendBatch(events: Event<M>[], isRetry: boolean = false) {
|
||||||
logger.debug(`sendBatch: ${events.length}`, {
|
|
||||||
isRetry,
|
|
||||||
})
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const body = JSON.stringify({events})
|
const body = JSON.stringify({events})
|
||||||
if (env.IS_WEB && 'navigator' in globalThis && navigator.sendBeacon) {
|
if (env.IS_WEB && 'navigator' in globalThis && navigator.sendBeacon) {
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ export function PublicationCard({
|
|||||||
/>
|
/>
|
||||||
<View style={[a.flex_1, a.gap_2xs]}>
|
<View style={[a.flex_1, a.gap_2xs]}>
|
||||||
<Text
|
<Text
|
||||||
|
emoji
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={[
|
style={[
|
||||||
a.text_md,
|
a.text_md,
|
||||||
@@ -386,7 +387,7 @@ export function PublicationCard({
|
|||||||
<View style={[a.pointer_events_none]}>
|
<View style={[a.pointer_events_none]}>
|
||||||
{view.description && (
|
{view.description && (
|
||||||
<View style={[a.pt_sm]}>
|
<View style={[a.pt_sm]}>
|
||||||
<Text style={[a.text_sm, a.leading_snug]} numberOfLines={3}>
|
<Text emoji style={[a.text_sm, a.leading_snug]} numberOfLines={3}>
|
||||||
{view.description}
|
{view.description}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -617,6 +618,7 @@ export function PublicationFooter({
|
|||||||
/>
|
/>
|
||||||
<View style={[a.flex_1, a.gap_2xs]}>
|
<View style={[a.flex_1, a.gap_2xs]}>
|
||||||
<Text
|
<Text
|
||||||
|
emoji
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={[
|
style={[
|
||||||
a.text_sm,
|
a.text_sm,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import {BskyAgent} from '@atproto/api'
|
import {BskyAgent} from '@atproto/api'
|
||||||
|
|
||||||
import {logger} from '#/logger'
|
|
||||||
import {device} from '#/storage'
|
import {device} from '#/storage'
|
||||||
|
|
||||||
export const BR_LABELER = 'did:plc:ekitcvx7uwnauoqy5oest3hm' // Brazil
|
export const BR_LABELER = 'did:plc:ekitcvx7uwnauoqy5oest3hm' // Brazil
|
||||||
@@ -77,8 +76,6 @@ export function configureAdditionalModerationAuthorities() {
|
|||||||
if (geolocation?.countryCode) {
|
if (geolocation?.countryCode) {
|
||||||
// overwrite with only those necessary
|
// overwrite with only those necessary
|
||||||
additionalLabelers = MODERATION_AUTHORITIES[geolocation.countryCode] ?? []
|
additionalLabelers = MODERATION_AUTHORITIES[geolocation.countryCode] ?? []
|
||||||
} else {
|
|
||||||
logger.info(`no geolocation, cannot apply mod authorities`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
@@ -89,10 +86,5 @@ export function configureAdditionalModerationAuthorities() {
|
|||||||
new Set([...BskyAgent.appLabelers, ...additionalLabelers]),
|
new Set([...BskyAgent.appLabelers, ...additionalLabelers]),
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info(`applying mod authorities`, {
|
|
||||||
additionalLabelers,
|
|
||||||
appLabelers,
|
|
||||||
})
|
|
||||||
|
|
||||||
BskyAgent.configure({appLabelers})
|
BskyAgent.configure({appLabelers})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ function ProfileCard({minimal}: {minimal: boolean}) {
|
|||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<Text
|
<Text
|
||||||
|
emoji
|
||||||
style={[a.font_bold, a.text_sm, a.leading_snug]}
|
style={[a.font_bold, a.text_sm, a.leading_snug]}
|
||||||
numberOfLines={1}>
|
numberOfLines={1}>
|
||||||
{sanitizeDisplayName(
|
{sanitizeDisplayName(
|
||||||
|
|||||||
Reference in New Issue
Block a user